summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/is_numeric.rb
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2013-01-03 13:39:05 -0800
committerJeff McCune <jeff@puppetlabs.com>2013-01-03 13:39:05 -0800
commitfb7ae217438590c8ca081d9646f2823d03bbb83d (patch)
treec929d881a8cd141ff34e2f9a02de712dc4611c54 /lib/puppet/parser/functions/is_numeric.rb
parent97cb7595337c238c994e703464f533dcf98049e8 (diff)
parentd7aea0f0be659223452ba2d65e799d2b7dbfd823 (diff)
downloadpuppet-stdlib-fb7ae217438590c8ca081d9646f2823d03bbb83d.tar.gz
puppet-stdlib-fb7ae217438590c8ca081d9646f2823d03bbb83d.tar.bz2
Merge branch '3.x' into 4.x
* 3.x: Add test/validation for is_float if created from an arithmetical operation Add test/validation for is_integer if created from an arithmetical operation Add test/validation for is_numeric if created from an arithmetical operation
Diffstat (limited to 'lib/puppet/parser/functions/is_numeric.rb')
-rw-r--r--lib/puppet/parser/functions/is_numeric.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/is_numeric.rb b/lib/puppet/parser/functions/is_numeric.rb
index ce13ece..abf0321 100644
--- a/lib/puppet/parser/functions/is_numeric.rb
+++ b/lib/puppet/parser/functions/is_numeric.rb
@@ -15,7 +15,7 @@ Returns true if the variable passed to this function is a number.
value = arguments[0]
- if value == value.to_f.to_s or value == value.to_i.to_s then
+ if value == value.to_f.to_s or value == value.to_i.to_s or value.is_a? Numeric then
return true
else
return false