puppetlabs/puppet · error · ArgumentError
A Numeric is not comparable to non Numeric
Error message
A Numeric is not comparable to non Numeric
What it means
Error "A Numeric is not comparable to non Numeric" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/evaluator/compare_operator.rb:70
raise ArgumentError, _("A String is not comparable to a non String")
end
# Equality is case independent.
def equals_String(a, b)
return false unless b.is_a?(String)
a.casecmp(b) == 0
end
def cmp_Numeric(a, b)
case b
when Numeric
a <=> b
when Time::Timespan, Time::Timestamp
-(b <=> a) # compare other way and invert result
else
raise ArgumentError, _("A Numeric is not comparable to non Numeric")
end
end
def equals_Numeric(a, b)
if b.is_a?(Numeric)
a == b
else
false
end
end
def equals_Array(a, b)
return false unless b.is_a?(Array) && a.size == b.size
a.each_index { |i| return false unless equals(a.slice(i), b.slice(i)) }
true
end
View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/evaluator/compare_operator.rb:70 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/9917098fe2094a00.
Report an issue: GitHub.