{"record":{"id":"eefcebbe92cb77fe","repo":"ruby/ruby","slug":"expected-array-of-or-hash-of-components-of-klass","errorCode":null,"errorMessage":"expected Array of or Hash of components of #{klass} (#{klass.component[1..-1].join(', ')})","messagePattern":"expected Array of or Hash of components of #(.+?) \\(#(.+?)\\)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/uri/common.rb","lineNumber":87,"sourceCode":"          array_hash.size == klass.component.size - 1\n        klass.component[1..-1].each_index do |i|\n          begin\n            tmp[klass.component[i + 1]] = array_hash[i].clone\n          rescue TypeError\n            tmp[klass.component[i + 1]] = array_hash[i]\n          end\n        end\n\n      elsif array_hash.kind_of?(Hash)\n        array_hash.each do |key, value|\n          begin\n            tmp[key] = value.clone\n          rescue TypeError\n            tmp[key] = value\n          end\n        end\n      else\n        raise ArgumentError,\n          \"expected Array of or Hash of components of #{klass} (#{klass.component[1..-1].join(', ')})\"\n      end\n      tmp[:scheme] = klass.to_s.sub(/\\A.*::/, '').downcase\n\n      return tmp\n    end\n    module_function :make_components_hash\n  end\n\n  module Schemes # :nodoc:\n    class << self\n      ReservedChars = \".+-\"\n      EscapedChars = \"\\u01C0\\u01C1\\u01C2\"\n      # Use Lo category chars as escaped chars for TruffleRuby, which\n      # does not allow Symbol categories as identifiers.\n\n      def escape(name)\n        unless name and name.ascii_only?","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/ruby/ruby/blob/0e5b888e1c355f3f728f2659f085820937dada48/lib/uri/common.rb#L69-L105","documentation":"Error \"expected Array of or Hash of components of #{klass} (#{klass.component[1..-1].join(', ')})\" thrown in ruby/ruby.","triggerScenarios":"Thrown at lib/uri/common.rb:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0e5b888e1c355f3f728f2659f085820937dada48","analyzedAt":"2026-08-21T14:25:43.473Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}