8000 YJIT: Replace Array#each only when YJIT is enabled by k0kubun · Pull Request #11955 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

YJIT: Replace Array#each only when YJIT is enabled #11955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Nov 4, 2024
Merged
Prev Previous commit
Next Next commit
Allow inconsistent source_location in test-spec
  • Loading branch information
k0kubun committed Nov 1, 2024
commit b0e58a2063091188ea786a588fc74ecf74c0b6af
7 changes: 5 additions & 2 deletions spec/ruby/optional/capi/debug_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@

it "matches the locations in rb_debug_inspector_backtrace_locations" do
frames = @o.rb_debug_inspector_open(42)
frames.each do |_s, _klass, binding, _iseq, backtrace_location|
frames.each do |_s, klass, binding, iseq, backtrace_location|
if binding
binding.source_location.should == [backtrace_location.path, backtrace_location.lineno]
# YJIT modifies Array#each backtraces but leaves its source_location as is
unless defined?(RubyVM::YJIT) && klass == Array && iseq.label == "each"
binding.source_location.should == [backtrace_location.path, backtrace_location.lineno]
end
method_name = binding.eval('__method__')
if method_name
method_name.should == backtrace_location.base_label.to_sym
Expand Down
Loading
0