Skip to content

Commit 3348c46

Browse files
authored
Add an option to suppress code_around_binding (#444)
for debug.gem's `irb` command
1 parent 512c771 commit 3348c46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/irb.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,10 +924,10 @@ class Binding
924924
#
925925
#
926926
# See IRB@IRB+Usage for more information.
927-
def irb
927+
def irb(show_code: true)
928928
IRB.setup(source_location[0], argv: [])
929929
workspace = IRB::WorkSpace.new(self)
930-
STDOUT.print(workspace.code_around_binding)
930+
STDOUT.print(workspace.code_around_binding) if show_code
931931
binding_irb = IRB::Irb.new(workspace)
932932
binding_irb.context.irb_path = File.expand_path(source_location[0])
933933
binding_irb.run(IRB.conf)

0 commit comments

Comments
 (0)