diff options
Diffstat (limited to 'test/ruby/test_marshal.rb')
-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 3d7ce7d9e4..412039d106 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -725,4 +725,16 @@ class TestMarshal < Test::Unit::TestCase opt = %w[--disable=gems] assert_ruby_status(opt, "Marshal.load(#{crash.dump})") end + + def test_marshal_load_r_prepare_reference_crash + crash = "\x04\bI/\x05\x00\x06:\x06E{\x06@\x05T" + + opt = %w[--disable=gems] + assert_ruby_status(opt, <<-RUBY) +begin + Marshal.load(#{crash.dump}) +rescue ArgumentError +end + RUBY + end end |