diff options
author | Stan Lo <stan001212@gmail.com> | 2023-11-27 10:34:36 +0000 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-27 10:34:40 +0000 |
commit | a07d84b63c7785f6f1a0c5f6933c0b7fa87df1d8 (patch) | |
tree | 5038b2fc382819dc30201771dad68f3977428f54 /lib/irb | |
parent | 71a8daecd9ad10ba8aa0d66131e326722f1d78ad (diff) | |
download | ruby-a07d84b63c7785f6f1a0c5f6933c0b7fa87df1d8.tar.gz |
[ruby/irb] Hide debugger hint after the input is submitted
(https://github.com/ruby/irb/pull/789)
If `output_modifier_proc`'s `complete` arg is true, it means the input is
submitted. In that case, debugger hint doesn't provide value to users
and adds noise to the output. So we hide it in such case.
https://github.com/ruby/irb/commit/f86d9dbe2f
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/debug.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/debug.rb b/lib/irb/debug.rb index 514395605f..1ec2335a8e 100644 --- a/lib/irb/debug.rb +++ b/lib/irb/debug.rb @@ -64,7 +64,7 @@ module IRB unless output.strip.empty? cmd = output.split(/\s/, 2).first - if DEBUGGER__.commands.key?(cmd) + if !complete && DEBUGGER__.commands.key?(cmd) output = output.sub(/\n$/, " # debug command\n") end end |