X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Ffloor.rb;h=9e4b5044b24245f538099f07f0d104831f71dab8;hb=6963202b4b62c2816655ac9532521b018fdf83bd;hp=9a6f014d7c1f25ed98983581971e50f67514b8cc;hpb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/floor.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/floor.rb index 9a6f014d7..9e4b5044b 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/floor.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/floor.rb @@ -5,18 +5,15 @@ module Puppet::Parser::Functions EOS ) do |arguments| - raise(Puppet::ParseError, "floor(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 + raise(Puppet::ParseError, "floor(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 begin arg = Float(arguments[0]) rescue TypeError, ArgumentError => e - raise(Puppet::ParseError, "floor(): Wrong argument type " + - "given (#{arguments[0]} for Numeric)") + raise(Puppet::ParseError, "floor(): Wrong argument type given (#{arguments[0]} for Numeric)") end - raise(Puppet::ParseError, "floor(): Wrong argument type " + - "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false + raise(Puppet::ParseError, "floor(): Wrong argument type given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false arg.floor end