Skip to content
Browse files

Only remove Class#to_yaml if it was defined there (fixes bundler-1.0.…

…10 incompatibility).
  • Loading branch information...
1 parent 00ad3ad commit 374c3fe68e43b46e91691c8a3e6c822834fbd559 @benhoskings benhoskings committed with gaffneyc Feb 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/delayed/yaml_ext.rb
View
2 lib/delayed/yaml_ext.rb
@@ -27,7 +27,7 @@ def yaml_tag_read_class(name)
class Class
yaml_as "tag:ruby.yaml.org,2002:class"
- remove_method :to_yaml # use Module's to_yaml
+ remove_method :to_yaml if respond_to?(:to_yaml) && method(:to_yaml).owner == Class # use Module's to_yaml
end
class Struct

0 comments on commit 374c3fe

Please sign in to comment.
Something went wrong with that request. Please try again.