From eee70b41d4c04caa06a68cc4847a600eb7322cb8 Mon Sep 17 00:00:00 2001 From: aycabta Date: Thu, 21 Nov 2019 02:44:15 +0900 Subject: Add a warning message and --legacy of an alias of --singleline --- lib/irb/context.rb | 6 ++++++ lib/irb/init.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1