diff options
| author | Aaron Patterson <tenderlove@ruby-lang.org> | 2026-05-29 16:41:31 -0700 |
|---|---|---|
| committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2026-05-29 16:41:31 -0700 |
| commit | ddb5055d961d970aded287cfebd07b78efee3ca7 (patch) | |
| tree | 0293266d352f9d0809fe17fdb6ab3ff833908e26 /test/ruby/test_shapes.rb | |
| parent | 63d9f090b5d9461cf0b9446e0039d9c56156b826 (diff) | |
This reverts commit 63d9f090b5d9461cf0b9446e0039d9c56156b826.
Diffstat (limited to 'test/ruby/test_shapes.rb')
| -rw-r--r-- | test/ruby/test_shapes.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/test/ruby/test_shapes.rb b/test/ruby/test_shapes.rb index bace69658a..ef5dbd9fb1 100644 --- a/test/ruby/test_shapes.rb +++ b/test/ruby/test_shapes.rb @@ -1067,37 +1067,6 @@ class TestShapes < Test::Unit::TestCase assert_nil shape.parent end - def test_shape_layout - assert_equal :robject, RubyVM::Shape.of(TestObject.new).layout - - if ENV["RUBY_BOX"] - assert_equal :other, RubyVM::Shape.of(Kernel).layout - assert_equal :other, RubyVM::Shape.of(String).layout - else - assert_equal :rclass, RubyVM::Shape.of(Kernel).layout - assert_equal :rclass, RubyVM::Shape.of(String).layout - end - - assert_equal :rclass, RubyVM::Shape.of(Class.new).layout - assert_equal :rclass, RubyVM::Shape.of(Module.new).layout - - klass = Class.new - assert_equal :rclass, RubyVM::Shape.of(klass).layout - klass.instance_variable_set(:@a, 123) - assert_equal :rclass, RubyVM::Shape.of(klass).layout - - assert_equal :rdata, RubyVM::Shape.of(Thread.current).layout - assert_equal :rdata, RubyVM::Shape.of(lambda {}).layout - - assert_equal :other, RubyVM::Shape.of(Struct.new(:x).new(1)).layout - assert_equal :other, RubyVM::Shape.of([]).layout - assert_equal :other, RubyVM::Shape.of("hello").layout - assert_equal :other, RubyVM::Shape.of(/foo/).layout - assert_equal :other, RubyVM::Shape.of(2..3).layout - assert_equal :other, RubyVM::Shape.of(2**67).layout - assert_equal :other, RubyVM::Shape.of(:"aaroniscool#{123}").layout - end - def test_str_has_root_shape assert_shape_equal(RubyVM::Shape.root_shape, RubyVM::Shape.of("")) end |
