{"record":{"id":"3f494a1fb9378fa4","repo":"puppetlabs/puppet","slug":"timestamps-are-only-comparable-to-timestamps-inte","errorCode":null,"errorMessage":"Timestamps are only comparable to Timestamps, Integers, and Floats","messagePattern":"Timestamps are only comparable to Timestamps, Integers, and Floats","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/evaluator/compare_operator.rb","lineNumber":111,"sourceCode":"    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\n    a <=> b\n  end\n\n  def cmp_Object(a, b)\n    raise ArgumentError, _('Only Strings, Numbers, Timespans, Timestamps, and Versions are comparable')\n  end\n\n  def equals_Object(a, b)\n    a == b\n  end\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/evaluator/compare_operator.rb#L93-L129","documentation":"Error \"Timestamps are only comparable to Timestamps, Integers, and Floats\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/evaluator/compare_operator.rb:111 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"}