8000 Fix a random test failure by TracePoint · github/ruby@50c63ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 50c63ab

Browse files
committed
Fix a random test failure by TracePoint
A test worker process may already be enabling TracePoint, which results in changing the insn name in this test. http://ci.rvm.jp/results/trunk-random0@phosphorus-docker/3022750
1 parent 737da8d commit 50c63ab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/ruby/test_iseq.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,10 @@ def test_iseq_of_twice_for_same_code
566566
end
567567

568568
def test_iseq_builtin_to_a
569-
insns = RubyVM::InstructionSequence.of([].method(:pack)).to_a.last
570-
invokebuiltin = insns.find { |insn| insn.is_a?(Array) && insn[0] == :opt_invokebuiltin_delegate_leave }
569+
invokebuiltin = eval(EnvUtil.invoke_ruby(['-e', <<~EOS], '', true).first)
570+
insns = RubyVM::InstructionSequence.of([].method(:pack)).to_a.last
571+
p insns.find { |insn| insn.is_a?(Array) && insn[0] == :opt_invokebuiltin_delegate_leave }
572+
EOS
571573
assert_not_nil(invokebuiltin)
572574
assert_equal([:func_ptr, :argc, :index, :name], invokebuiltin[1].keys)
573575
end

0 commit comments

Comments
 (0)
0