diff options
Diffstat (limited to 'lib/irb/command/debug.rb')
-rw-r--r-- | lib/irb/command/debug.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/irb/command/debug.rb b/lib/irb/command/debug.rb index aeafe19b5f..f9aca0a672 100644 --- a/lib/irb/command/debug.rb +++ b/lib/irb/command/debug.rb @@ -18,6 +18,9 @@ module IRB end def execute_debug_command(pre_cmds: nil, do_cmds: nil) + pre_cmds = pre_cmds&.rstrip + do_cmds = do_cmds&.rstrip + if irb_context.with_debugger # If IRB is already running with a debug session, throw the command and IRB.debug_readline will pass it to the debugger. if cmd = pre_cmds || do_cmds |