EOS
) do |arguments|
- raise(Puppet::ParseError, "hash(): Wrong number of arguments " +
- "given (#{arguments.size} for 1)") if arguments.size < 1
+ raise(Puppet::ParseError, "hash(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
array = arguments[0]
# This is to make it compatible with older version of Ruby ...
array = array.flatten
result = Hash[*array]
- rescue Exception
- raise(Puppet::ParseError, 'hash(): Unable to compute ' +
- 'hash from array given')
+ rescue StandardError
+ raise(Puppet::ParseError, 'hash(): Unable to compute hash from array given')
end
return result