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

New way to run pry: "require 'binding.pry'" #1354

Closed
wants to merge 1 commit into from

Conversation

epitron
Copy link
Member

@epitron epitron commented Jan 21, 2015

Yep!

@epitron epitron force-pushed the master branch 2 times, most recently from 46d0536 to 4e43880 Compare January 21, 2015 09:43
b = binding.of_caller binding_num
iseq = b.instance_variable_get("@iseq")

if iseq.path[/kernel_require\.rb$/] and iseq.label == "require" # find the require method
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work when Bundler is installed, or do we need to skip more things?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point... this probably needs some testing. :)

Old rubies might also have their require defined in a different file (rubygems.rb?)

@kyrylo
Copy link
Member

kyrylo commented Feb 28, 2015

We decided that a meta gem implementing this would be the proper solution. Cool feature, we're all languishing to see it work, @epitron!

@kyrylo kyrylo closed this Feb 28, 2015
@epitron
Copy link
Member Author

epitron commented Mar 25, 2015

A meta-gem for such a tiny thing? That defeats the purpose! This is about convenience!

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

3 participants