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

prefer caller_locations and Thread::Backtrace::Location methods to Kernel#caller #638

Merged
merged 2 commits into from Feb 21, 2024

Conversation

flavorjones
Copy link
Member

Mechanize has still been using Kernel#caller whose string representation has changed enough in Ruby 3.4.0.dev to break how deprecation messages were being handrolled.

Replace all uses of caller with caller_locations which is both faster and returns an object with some nice methods we can use to isolate the method, the file, and the line number.

This should get us green again on ruby-head.

so that we have test coverage for both class and instance methods'
deprecation messages.
Mechanize has still been using `Kernel#caller` whose string
representation has changed enough in Ruby 3.4.0.dev to break how
deprecation messages were being handrolled.

Replace all uses of `caller` with `caller_locations` which is both
faster and returns an object with some nice methods we can use to
isolate the method, the file, and the line number.

This should get us green again on ruby-head.
@flavorjones flavorjones merged commit 2d4b1af into main Feb 21, 2024
14 checks passed
@flavorjones flavorjones deleted the flavorjones-prefer-caller-location branch February 21, 2024 19:22
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

1 participant