ruby-changes:58868
From: aycabta <ko1@a...>
Date: Thu, 21 Nov 2019 02:54:50 +0900 (JST)
Subject: [ruby-changes:58868] eee70b41d4 (master): Add a warning message and --legacy of an alias of --singleline
https://git.ruby-lang.org/ruby.git/commit/?id=eee70b41d4 From eee70b41d4c04caa06a68cc4847a600eb7322cb8 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Thu, 21 Nov 2019 02:44:15 +0900 Subject: Add a warning message and --legacy of an alias of --singleline diff --git a/lib/irb/context.rb b/lib/irb/context.rb index f529787..94def5f 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -82,6 +82,12 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/context.rb#L82 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 11f3932..ebae371 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -161,7 +161,7 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/init.rb#L161 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/