diff options
author | Stan Lo <[email protected]> | 2024-04-11 01:33:40 +0800 |
---|---|---|
committer | git <[email protected]> | 2024-04-10 17:33:44 +0000 |
commit | d75dc3988059ac2fc6eb06f29508ef935f5e0139 (patch) | |
tree | 7084cfb587b993549fb2c4a5e03dd02e0011529d /lib/irb/command/debug.rb | |
parent | d60b2caa95b01f37d35db9ef8be1d035d14b408d (diff) |
[ruby/irb] Centralize rstrip calls
(https://github.com/ruby/irb/pull/918)
https://github.com/ruby/irb/commit/97898b6251
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 |