projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update stdlib
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
lib
/
puppet
/
parser
/
functions
/
hash.rb
diff --git
a/3rdparty/modules/stdlib/lib/puppet/parser/functions/hash.rb
b/3rdparty/modules/stdlib/lib/puppet/parser/functions/hash.rb
index
8cc4823
..
22763f3
100644
(file)
--- a/
3rdparty/modules/stdlib/lib/puppet/parser/functions/hash.rb
+++ b/
3rdparty/modules/stdlib/lib/puppet/parser/functions/hash.rb
@@
-14,8
+14,7
@@
Would return: {'a'=>1,'b'=>2,'c'=>3}
EOS
) do |arguments|
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]
array = arguments[0]
@@
-29,9
+28,8
@@
Would return: {'a'=>1,'b'=>2,'c'=>3}
# This is to make it compatible with older version of Ruby ...
array = array.flatten
result = Hash[*array]
# 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
end
return result