diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-17 16:47:49 -0800 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2022-11-18 00:47:53 +0000 |
| commit | d8202a52a5fedd2209248b030ea6c41382f5f3e2 (patch) | |
| tree | 8cfc20dc6b554a5112d4c43ebe5406bebdb86b4a | |
| parent | cb4c89e08ea2f879b6a860a3d6944efce6c9bf50 (diff) | |
[ruby/irb] Add an option to suppress code_around_binding
(https://github.com/ruby/irb/pull/444)
for debug.gem's `irb` command
| -rw-r--r-- | lib/irb.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index ab5702c9f2..1c38960cc0 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -924,10 +924,10 @@ class Binding # # # See IRB@IRB+Usage for more information. - def irb + def irb(show_code: true) IRB.setup(source_location[0], argv: []) workspace = IRB::WorkSpace.new(self) - STDOUT.print(workspace.code_around_binding) + STDOUT.print(workspace.code_around_binding) if show_code binding_irb = IRB::Irb.new(workspace) binding_irb.context.irb_path = File.expand_path(source_location[0]) binding_irb.run(IRB.conf) |
