[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:43 UTC 2011
The following commit has been merged in the experimental branch:
commit de2199f3666ca9e26a0a36ec17b176300a4fa599
Author: Daniel Pittman <daniel at puppetlabs.com>
Date: Thu Apr 21 15:01:38 2011 -0700
(#6928) Don't blow up when the method is undefined...
Use the same model for testing instance methods as the rest of the code.
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 9ae0ca6..bd954c6 100644
--- a/lib/puppet/util/monkey_patches.rb
+++ b/lib/puppet/util/monkey_patches.rb
@@ -106,10 +106,8 @@ class Array
end
-if Symbol.instance_method(:to_proc).nil?
- class Symbol
- def to_proc
- Proc.new { |*args| args.shift.__send__(self, *args) }
- end
- end
+class Symbol
+ def to_proc
+ Proc.new { |*args| args.shift.__send__(self, *args) }
+ end unless method_defined? :to_proc
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list