From 5080de6ca2b08db45d92a8fc1d788095ff84ed1b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 12 Jan 2024 14:22:14 -0800 Subject: [PATCH] Stop assuming Array#each is written in C Same as https://github.com/ruby/debug/pull/1015, but for Array#each. We're thinking of rewriting it in Ruby, and I'd like to avoid failing on test-bundled-gems in the PR. --- test/console/backtrace_test.rb | 4 ++-- test/console/break_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/console/backtrace_test.rb b/test/console/backtrace_test.rb index 3f926aebb..570d66c80 100644 --- a/test/console/backtrace_test.rb +++ b/test/console/backtrace_test.rb @@ -22,7 +22,7 @@ def program 14| end 15| end 16| - 17| [1, 2, 3].each do + 17| [1, 2, 3].reverse_each do 18| Foo.new.first_call 19| end RUBY @@ -33,7 +33,7 @@ def test_backtrace_prints_c_method_frame type 'b 18' type 'c' type 'bt' - assert_line_text(/\[C\] Array#each/) + assert_line_text(/\[C\] Array#reverse_each/) type 'kill!' end end diff --git a/test/console/break_test.rb b/test/console/break_test.rb index dc06f3d1d..2cf378402 100644 --- a/test/console/break_test.rb +++ b/test/console/break_test.rb @@ -388,7 +388,7 @@ def program 2| 3| result = "" 4| - 5| [1, 2, 3].each do |i| + 5| [1, 2, 3].reverse_each do |i| 6| result += i.to_s 7| end 8|