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:
parent
9d6f78822c
commit
eee70b41d4
2 changed files with 7 additions and 1 deletions
|
|
@ -82,6 +82,12 @@ module IRB
|
||||||
case use_multiline?
|
case use_multiline?
|
||||||
when nil
|
when nil
|
||||||
if STDIN.tty? && IRB.conf[:PROMPT_MODE] != :INF_RUBY && !use_singleline?
|
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
|
@io = ReidlineInputMethod.new
|
||||||
else
|
else
|
||||||
@io = nil
|
@io = nil
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ module IRB # :nodoc:
|
||||||
end
|
end
|
||||||
when "--noinspect"
|
when "--noinspect"
|
||||||
@CONF[:INSPECT_MODE] = false
|
@CONF[:INSPECT_MODE] = false
|
||||||
when "--singleline", "--readline"
|
when "--singleline", "--readline", "--legacy"
|
||||||
@CONF[:USE_SINGLELINE] = true
|
@CONF[:USE_SINGLELINE] = true
|
||||||
when "--nosingleline", "--noreadline"
|
when "--nosingleline", "--noreadline"
|
||||||
@CONF[:USE_SINGLELINE] = false
|
@CONF[:USE_SINGLELINE] = false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue