diff options
author | Aaron Patterson <[email protected]> | 2023-10-19 16:01:35 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2023-10-24 10:52:06 -0700 |
commit | a3f66e09f6596259677f00255a9b6231a2739774 () | |
tree | addc47766e34c520307baab7952343855af872e0 /test/ruby/test_shapes.rb | |
parent | caf6a72348431e0e6b61be84919cd06c7a745189 (diff) |
geniv objects can become too complex
-rw-r--r-- | test/ruby/test_shapes.rb | 94 |
1 files changed, 89 insertions, 5 deletions
@@ -126,13 +126,24 @@ class TestShapes < Test::Unit::TestCase end def test_too_many_ivs_on_obj - obj = Object.new - (RubyVM::Shape::SHAPE_MAX_NUM_IVS + 1).times do - obj.instance_variable_set(:"@a#{_1}", 1) - end - assert_predicate RubyVM::Shape.of(obj), :too_complex? end def test_too_many_ivs_on_class @@ -171,6 +182,79 @@ class TestShapes < Test::Unit::TestCase assert_empty obj.instance_variables end def test_too_complex_ractor assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") begin; |