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

Add whereami command #204

Merged
merged 1 commit into from
Mar 21, 2021
Merged

Add whereami command #204

merged 1 commit into from
Mar 21, 2021

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Mar 18, 2021

This is another command in pry. When you execute a lot of expressions after your binding.irb invocation, sometimes the source code of your context may go out of your screen. If you use this whereami like gdb's list, you can show the code again.

$ ruby /tmp/a.rb

From: /tmp/a.rb @ line 3 :

    1: a = 1
    2: @b = 2
 => 3: binding.irb

irb(main)[01:0]> a
=> 1
irb(main)[02:0]> @b
=> 2
irb(main)[03:0]> whereami

From: /tmp/a.rb @ line 3 :

    1: a = 1
    2: @b = 2
 => 3: binding.irb

=> nil

Copy link
Member

@aycabta aycabta left a comment

Choose a reason for hiding this comment

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

Please don't contain merge commit and please use git rebase origin/master.

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

Successfully merging this pull request may close these issues.

2 participants