diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_shapes.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_shapes.rb b/test/ruby/test_shapes.rb index a4cf23c6d5..ed55b95c3e 100644 --- a/test/ruby/test_shapes.rb +++ b/test/ruby/test_shapes.rb @@ -657,6 +657,14 @@ class TestShapes < Test::Unit::TestCase def test_object_id_transition_too_complex assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") begin; + obj = Object.new + obj.instance_variable_set(:@a, 1) + RubyVM::Shape.exhaust_shapes + assert_equal obj.object_id, obj.object_id + end; + + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; class Hi; end obj = Hi.new obj.instance_variable_set(:@a, 1) |
