[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:17:41 UTC 2011


The following commit has been merged in the experimental branch:
commit a0de3288bad113c9be1190095b03e892e17000d2
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Thu Apr 21 14:46:36 2011 -0700

    (#6928) backport Symbol#to_proc for Ruby < 1.8.7
    
    We use the &:foo symbol-to-proc syntax in some of our code, so to avoid
    problems on Ruby earlier than 1.8.7 we should backport the support in our
    monkey-patch file.
    
    Reviewed-By: Max Martin <max at puppetlabs.com>

diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
index 10a2684..9ae0ca6 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

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list