1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add a warning message and --legacy of an alias of --singleline

This commit is contained in:
aycabta 2019-11-21 02:44:15 +09:00
parent 9d6f78822c
commit eee70b41d4
2 changed files with 7 additions and 1 deletions

View file

@ -82,6 +82,12 @@ module IRB
case use_multiline?
when nil
if STDIN.tty? && IRB.conf[:PROMPT_MODE] != :INF_RUBY && !use_singleline?
# Both of multiline mode and singleline mode aren't specified.
puts <<~EOM
This version of IRB is drastically different from the previous version.
If you hit any issues, you can use "irb --legacy" to run the old version.
If you want to just erase this message, please use "irb --multiline".
EOM
@io = ReidlineInputMethod.new
else
@io = nil

View file

@ -161,7 +161,7 @@ module IRB # :nodoc:
end
when "--noinspect"
@CONF[:INSPECT_MODE] = false
when "--singleline", "--readline"
when "--singleline", "--readline", "--legacy"
@CONF[:USE_SINGLELINE] = true
when "--nosingleline", "--noreadline"
@CONF[:USE_SINGLELINE] = false