diff options
| author | nagachika <nagachika@ruby-lang.org> | 2025-03-29 15:21:40 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2025-03-29 15:21:40 +0900 |
| commit | d2eda78e4091a99c1a387d43967af5794d8eac70 (patch) | |
| tree | 982247e4bf7486a5daac8c0db7b1f5526fc54839 /test | |
| parent | c1319d7e406ddf3f0da487296f1c4c50d90496ad (diff) | |
merge revision(s) 9459bedd84d479bb1d7d3d40bada1cecb4701c37: [Backport #19841]
[Bug #19841] Refine error on marshaling recursive USERDEF
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_marshal.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 13645e3aa8..c27de3524e 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -668,6 +668,15 @@ class TestMarshal < Test::Unit::TestCase end end + def test_recursive_userdef + t = Time.utc(0) + str = "b".b + t.instance_eval {@v = t} + assert_raise_with_message(RuntimeError, /recursive\b.*\b_dump/) do + Marshal.dump(t) + end + end + def test_unloadable_usrmarshal c = eval("class UsrMarshal\u{23F0 23F3}<Time;self;end") c.class_eval { |
