diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_shapes.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ruby/test_shapes.rb b/test/ruby/test_shapes.rb index 148595ac32..e3532c5ae0 100644 --- a/test/ruby/test_shapes.rb +++ b/test/ruby/test_shapes.rb @@ -621,6 +621,24 @@ class TestShapes < Test::Unit::TestCase end; end + def test_too_complex_obj_ivar_ractor_share + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + $VERBOSE = nil + + RubyVM::Shape.exhaust_shapes + + r = Ractor.new do + o = Object.new + o.instance_variable_set(:@a, "hello") + Ractor.yield(o) + end + + o = r.take + assert_equal "hello", o.instance_variable_get(:@a) + end; + end + def test_too_complex_generic_ivar_ractor_share assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") begin; |
