File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,14 @@ def test_tracing_retained_objects
45
45
top_stack_tally = result . samples . tally . max_by ( &:last )
46
46
top_stack = result . stack ( top_stack_tally . first )
47
47
48
- assert_equal "Class#new" , top_stack . frames [ 0 ] . label
49
- assert_equal "#{ self . class } ##{ __method__ } " , top_stack . frames [ 1 ] . label
48
+ # https://bugs.ruby-lang.org/issues/21254
49
+ if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( "3.5.0" )
50
+ assert_equal "#{ self . class } ##{ __method__ } " , top_stack . frames [ 0 ] . label
51
+ assert_equal "Integer#times" , top_stack . frames [ 1 ] . label
52
+ else
53
+ assert_equal "Class#new" , top_stack . frames [ 0 ] . label
54
+ assert_equal "#{ self . class } ##{ __method__ } " , top_stack . frames [ 1 ] . label
55
+ end
50
56
end
51
57
52
58
def test_empty_block
You can’t perform that action at this time.
0 commit comments