From 753222d72c8787f2d57781c2e55194da2d3d0d8f Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 8 Dec 2020 08:56:01 -0800 Subject: [PATCH] [ruby/irb] Enable deprecation warnings when using -W or -w Requested in Ruby Bug 17377 https://github.com/ruby/irb/commit/698f6eb34a --- lib/irb/init.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/irb/init.rb b/lib/irb/init.rb index e60b5266ff..48b669f211 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -131,7 +131,7 @@ module IRB # :nodoc: $DEBUG = true $VERBOSE = true when "-w" - $VERBOSE = true + Warning[:deprecated] = $VERBOSE = true when /^-W(.+)?/ opt = $1 || argv.shift case opt @@ -140,7 +140,7 @@ module IRB # :nodoc: when "1" $VERBOSE = false else - $VERBOSE = true + Warning[:deprecated] = $VERBOSE = true end when /^-r(.+)?/ opt = $1 || argv.shift