We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 996c208 commit 20e1194Copy full SHA for 20e1194
lib/puppet/parser/functions/typecast.rb
@@ -33,7 +33,7 @@ module Puppet::Parser::Functions
33
when /^[0-9]+\.[0-9]+$/
34
# found float
35
arguments[0].to_f
36
- when /^[0-9]+/
+ when /^[0-9]+$/
37
# found Fixnum
38
arguments[0].to_i
39
else
spec/functions/typecast_spec.rb
@@ -65,6 +65,9 @@
65
it "should return strings" do
66
result = scope.function_typecast(['bob'])
67
expect(result).to(eq('"bob"'))
68
+
69
+ result = scope.function_typecast(['4bob'])
70
+ expect(result).to(eq('"4bob"'))
71
end
72
73
0 commit comments