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

Use Kernel#caller_locations if available (1.x) #1492

Open
wants to merge 1 commit into
base: stable
from

Conversation

Projects
None yet
1 participant
@julik

julik commented Nov 5, 2018

Ruby 2.x includes caller_locations in Kernel. The implementation
is subtly different from what Sinatra used to provide, which leads
to compatibility issues when an external caller tries to use
caller_locations.

This changes the previous implementation to be closer to caller_locations
as implemented in Kernel on modern Rubies, and delegates to caller_locations
if Kernel provides it natively. This workaround is not required in Sinatra 2.x

This is a mirror PR for #1491 but for the stable 1.x,
and aims to address Shopify/bootsnap#183

Use Kernel#caller_locations if available
Ruby 2.x includes caller_locations in Kernel. The implementation
is subtly different from what Sinatra used to provide, which leads
to compatibility issues when an external caller tries to use
caller_locations.

This changes the previous implementation to be closer to caller_locations
as implemented in Kernel on modern Rubies, and delegates to caller_locations
if Kernel provides it natively. This workaround is not required in Sinatra 2.x

@julik julik changed the title from Use Kernel#caller_locations if available to Use Kernel#caller_locations if available (1.x) Nov 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment