From 8733a57ffb6e831274e73eb03fe1662ffa6e04d7 Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Sat, 30 Apr 2011 03:44:59 +0100 Subject: Making sure that the function hash will also work on older Rubies. Signed-off-by: Krzysztof Wilczynski --- hash.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hash.rb b/hash.rb index 7e63d43..f0c01d4 100644 --- a/hash.rb +++ b/hash.rb @@ -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 ' + -- cgit v1.2.3