vendored/puppet/lib/puppet/settings/ttl_setting.rb in bolt-0.17.1 vs vendored/puppet/lib/puppet/settings/ttl_setting.rb in bolt-0.17.2
- old
+ new
@@ -23,9 +23,14 @@
# Convert the value to Numeric, parsing numeric string with units if necessary.
def munge(value)
self.class.munge(value, @name)
end
+ def print(value)
+ val = munge(value)
+ val == Float::INFINITY ? 'unlimited' : val
+ end
+
# Convert the value to Numeric, parsing numeric string with units if necessary.
def self.munge(value, param_name)
case
when value.is_a?(Numeric)
if value < 0