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

Why is there no method to reprint the source within binding.irb? #67

Closed
olivierlacan opened this issue Jan 23, 2020 · 1 comment
Closed

Comments

@olivierlacan
Copy link

Description

When using binding.irb, the local source Ruby code is printed when the debugging session starts but if it's cleared there doesn't seem to be a method to reprint it.

# irb_source.rb
def test
  binding.irb
end

test
$ ruby irb_source.rb

From: irb_source_bug.rb @ line 2 :

    1: def test
 => 2:   binding.irb
    3: end
    4:
    5: test

irb(main):001:0>

Pry and byebug both offer a way to reprint the local source around the breakpoint without quitting the session. While it's understandable that binding.irb would have fewer features, this seems like an important one.

Terminal Emulator

What's your terminal emulator? iTerm 2

@tompng
Copy link
Member

tompng commented Aug 13, 2023

Command whereami is added in #204

@tompng tompng closed this as completed Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants