summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authorNobuhiro IMAI <nov@yo.rim.or.jp>2021-01-23 02:45:00 +0900
committergit <svn-admin@ruby-lang.org>2021-01-27 15:02:05 +0900
commite80e5a2f897088bc5284ea61817a910d1d334652 (patch)
tree99f01f494f2332274cb057956afc6f13761160df /lib/irb.rb
parent5b05b85d85002fd47eeb5e28f9f2898e99507b75 (diff)
[ruby/irb] use `RubyLex::TerminateLineInput` appropriately [Bug #17564]
* using the appropriciate exception instead of `break` so that the session can be continue after the `irb_source` and `irb_load` commands * suppress extra new line due to one more `#prompt` call https://github.com/ruby/irb/commit/bdefaa7cfd
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 3f7f169c69..7f99974f28 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -525,7 +525,7 @@ module IRB
printf "Use \"exit\" to leave %s\n", @context.ap_name
end
else
- print "\n"
+ print "\n" if @context.prompting?
end
end
l