summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych')
-rw-r--r--test/psych/visitors/test_yaml_tree.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/visitors/test_yaml_tree.rb b/test/psych/visitors/test_yaml_tree.rb
index ed89e78600..1cf0d634c8 100644
--- a/test/psych/visitors/test_yaml_tree.rb
+++ b/test/psych/visitors/test_yaml_tree.rb
@@ -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))