summaryrefslogtreecommitdiff
path: root/test/objspace/test_objspace.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-05-21 10:03:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-05-21 10:31:38 +0900
commita997f144fb09f0ccb1662d79bd634833187770d7 (patch)
tree5c773fe5209a12464db41fbd6d4200e21a2653f5 /test/objspace/test_objspace.rb
parent1dd5427abeedff50557408c8b81bf71e5ff99bd3 (diff)
Skip first if flaky [ci skip]
Diffstat (limited to 'test/objspace/test_objspace.rb')
-rw-r--r--test/objspace/test_objspace.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index de2832d467..9b23930d15 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -287,10 +287,14 @@ class TestObjSpace < Test::Unit::TestCase
JSON.parse(info) if defined?(JSON)
end
- class TooComplex; end
-
if defined?(RubyVM::Shape)
+ class TooComplex; end
+
def test_dump_too_complex_shape
+ %i[YJIT RJIT].each do |jit|
+ omit "flaky with #{jit}" if RubyVM.const_defined?(jit) && RubyVM.const_get(jit).enabled?
+ end
+
RubyVM::Shape::SHAPE_MAX_VARIATIONS.times do
TooComplex.new.instance_variable_set(:"@a#{_1}", 1)
end
@@ -300,8 +304,6 @@ class TestObjSpace < Test::Unit::TestCase
assert_not_match(/"too_complex_shape"/, info)
tc.instance_variable_set(:@new_ivar, 1)
info = ObjectSpace.dump(tc)
- omit 'flaky with YJIT' if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
- omit 'flaky with RJIT' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
assert_match(/"too_complex_shape":true/, info)
if defined?(JSON)
assert_true(JSON.parse(info)["too_complex_shape"])