1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/psych/lib/psych/visitors/yaml_tree.rb: Rescue exceptions when

people implement the method method. Thanks Lin Jen-Shin.
  [ruby-core:35255]

* test/psych/visitors/test_yaml_tree.rb: test for implementation of
  method method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2011-03-09 03:51:39 +00:00
parent 095b279464
commit 4df71924e4
3 changed files with 37 additions and 12 deletions

View file

@ -38,6 +38,12 @@ module Psych
assert_equal s.foo, obj.foo
end
def test_override_method
s = Struct.new(:method).new('override')
obj = Psych.load(Psych.dump(s))
assert_equal s.method, obj.method
end
def test_exception
ex = Exception.new 'foo'
loaded = Psych.load(Psych.dump(ex))