Define RubyVM::Shape dependent test only if available

This commit is contained in:
Nobuyoshi Nakada 2023-05-04 13:41:30 +09:00
parent ac730d3e75
commit e135a21a85
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -287,8 +287,8 @@ class TestObjSpace < Test::Unit::TestCase
JSON.parse(info) if defined?(JSON) JSON.parse(info) if defined?(JSON)
end end
def test_dump_too_complex_shape if defined?(RubyVM::Shape)
if defined?(RubyVM::Shape) def test_dump_too_complex_shape
RubyVM::Shape::SHAPE_MAX_VARIATIONS.times do RubyVM::Shape::SHAPE_MAX_VARIATIONS.times do
Object.new.instance_variable_set(:"@a#{_1}", 1) Object.new.instance_variable_set(:"@a#{_1}", 1)
end end