diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_marshal.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index d21ab66ffd..bc22b5fd3a 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -757,4 +757,16 @@ class TestMarshal < Test::Unit::TestCase end assert_equal(obj, Marshal.load(dump)) end + + class Bug12974 + def marshal_dump + dup + end + end + + def test_marshal_dump_recursion + assert_raise_with_message(RuntimeError, /same class instance/) do + Marshal.dump(Bug12974.new) + end + end end |
