diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-21 14:47:20 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-21 14:47:20 -0700 |
| commit | 7004a3a7fedde756077501ef011e44afc897e254 (patch) | |
| tree | 3831d103510aa12c4a37a8d62c0e7032df14f1ce | |
| parent | c5ba77eff86ffedb4979b6968db0e2520dd1da25 (diff) | |
| parent | a0de3288bad113c9be1190095b03e892e17000d2 (diff) | |
| download | puppet-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.rb | 9 |
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 |
