summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-21 14:47:20 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-21 14:47:20 -0700
commit7004a3a7fedde756077501ef011e44afc897e254 (patch)
tree3831d103510aa12c4a37a8d62c0e7032df14f1ce
parentc5ba77eff86ffedb4979b6968db0e2520dd1da25 (diff)
parenta0de3288bad113c9be1190095b03e892e17000d2 (diff)
downloadpuppet-7004a3a7fedde756077501ef011e44afc897e254.tar.gz
puppet-7004a3a7fedde756077501ef011e44afc897e254.tar.xz
puppet-7004a3a7fedde756077501ef011e44afc897e254.zip
Merge branch 'bug/2.7.x/6928-backport-symbol-to_proc' into 2.7.x
-rw-r--r--lib/puppet/util/monkey_patches.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
index 10a268409..9ae0ca6a2 100644
--- a/lib/puppet/util/monkey_patches.rb
+++ b/lib/puppet/util/monkey_patches.rb
@@ -104,3 +104,12 @@ class Array
end
end unless method_defined? :combination
end
+
+
+if Symbol.instance_method(:to_proc).nil?
+ class Symbol
+ def to_proc
+ Proc.new { |*args| args.shift.__send__(self, *args) }
+ end
+ end
+end