Skip to content
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

Handle Ruby 3.1 eval location change #366

Merged

Conversation

casperisfine
Copy link
Contributor

Ref: ruby/ruby#4519

On Ruby 3.1, Backtrace::Location#absolute_path returns nil if the code was loaded with eval. That same PR made require_relative fallback to Backtrace::Location#path in such case, so we're doing the same.

@casperisfine casperisfine changed the title Handle Rails 3.1 eval location change Handle Ruby 3.1 eval location change Aug 2, 2021
Ref: ruby/ruby#4519

On Ruby 3.1, `Backtrace::Location#absolute_path` returns `nil` if the
code was loaded with eval. That same PR made `require_relative` fallback
to `Backtrace::Location#path` in such case, so we're doing the same.
@casperisfine casperisfine force-pushed the fix-ruby-head-require-relative-from-evaled-file branch from 6ec6663 to 0d64e7e Compare August 2, 2021 09:55
@casperisfine casperisfine merged commit b6f0c03 into master Aug 2, 2021
@casperisfine casperisfine deleted the fix-ruby-head-require-relative-from-evaled-file branch August 2, 2021 10:09
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems August 2, 2021 10:11 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems January 12, 2022 21:42 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants