{"record":{"id":"1089d9e2085e1c6f","repo":"puppetlabs/puppet","slug":"symbol-not-comparable-to-non-symbol","errorCode":null,"errorMessage":"Symbol not comparable to non Symbol","messagePattern":"Symbol not comparable to non Symbol","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/evaluator/compare_operator.rb","lineNumber":100,"sourceCode":"  def equals_Array(a, b)\n    return false unless b.is_a?(Array) && a.size == b.size\n\n    a.each_index { |i| return false unless equals(a.slice(i), b.slice(i)) }\n    true\n  end\n\n  def equals_Hash(a, b)\n    return false unless b.is_a?(Hash) && a.size == b.size\n\n    a.each { |ak, av| return false unless equals(b[ak], av) }\n    true\n  end\n\n  def cmp_Symbol(a, b)\n    if b.is_a?(Symbol)\n      a <=> b\n    else\n      raise ArgumentError, _(\"Symbol not comparable to non Symbol\")\n    end\n  end\n\n  def cmp_Timespan(a, b)\n    raise ArgumentError, _('Timespans are only comparable to Timespans, Integers, and Floats') unless b.is_a?(Time::Timespan) || b.is_a?(Integer) || b.is_a?(Float)\n\n    a <=> b\n  end\n\n  def cmp_Timestamp(a, b)\n    raise ArgumentError, _('Timestamps are only comparable to Timestamps, Integers, and Floats') unless b.is_a?(Time::Timestamp) || b.is_a?(Integer) || b.is_a?(Float)\n\n    a <=> b\n  end\n\n  def cmp_Version(a, b)\n    raise ArgumentError, _('Versions not comparable to non Versions') unless b.is_a?(SemanticPuppet::Version)\n","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/evaluator/compare_operator.rb#L82-L118","documentation":"Error \"Symbol not comparable to non Symbol\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/evaluator/compare_operator.rb:100 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":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}