summaryrefslogtreecommitdiff
path: root/lib/irb/command/debug.rb
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2024-04-11 01:33:40 +0800
committergit <[email protected]>2024-04-10 17:33:44 +0000
commitd75dc3988059ac2fc6eb06f29508ef935f5e0139 (patch)
tree7084cfb587b993549fb2c4a5e03dd02e0011529d /lib/irb/command/debug.rb
parentd60b2caa95b01f37d35db9ef8be1d035d14b408d (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.rb3
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