diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 03:44:59 +0100 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 03:44:59 +0100 |
commit | 8733a57ffb6e831274e73eb03fe1662ffa6e04d7 (patch) | |
tree | 12b9506a327c61aa9a8242341c352bb8b02df2ed | |
parent | b3be789b0da179e1011323e95468d3a1f2fd5083 (diff) |
Making sure that the function hash will also work on older Rubies.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
-rw-r--r-- | hash.rb | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -19,6 +19,8 @@ module Puppet::Parser::Functions result = {} begin + # 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 ' + |