diff options
author | aycabta <aycabta@gmail.com> | 2019-11-21 02:44:15 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-11-21 02:44:35 +0900 |
commit | eee70b41d4c04caa06a68cc4847a600eb7322cb8 (patch) | |
tree | 1b88d41d6c51a9967c37299bd7bd5c99631c06e4 /lib/irb | |
parent | 9d6f78822c61348989802848150f103f0a4ef7d0 (diff) | |
download | ruby-eee70b41d4c04caa06a68cc4847a600eb7322cb8.tar.gz |
Add a warning message and --legacy of an alias of --singleline
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/context.rb | 6 | ||||
-rw-r--r-- | lib/irb/init.rb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index f529787bae..94def5fc6a 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -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 diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 11f3932be2..ebae37146f 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -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 |