[前][次][番号順一覧][スレッド一覧]

ruby-changes:64245

From: Jeremy <ko1@a...>
Date: Thu, 17 Dec 2020 20:24:52 +0900 (JST)
Subject: [ruby-changes:64245] 753222d72c (master): [ruby/irb] Enable deprecation warnings when using -W or -w

https://git.ruby-lang.org/ruby.git/commit/?id=753222d72c

From 753222d72c8787f2d57781c2e55194da2d3d0d8f Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Tue, 8 Dec 2020 08:56:01 -0800
Subject: [ruby/irb] Enable deprecation warnings when using -W or -w

Requested in Ruby Bug 17377

https://github.com/ruby/irb/commit/698f6eb34a

diff --git a/lib/irb/init.rb b/lib/irb/init.rb
index e60b526..48b669f 100644
--- a/lib/irb/init.rb
+++ b/lib/irb/init.rb
@@ -131,7 +131,7 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/init.rb#L131
         $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: https://github.com/ruby/ruby/blob/trunk/lib/irb/init.rb#L140
         when "1"
           $VERBOSE = false
         else
-          $VERBOSE = true
+          Warning[:deprecated] = $VERBOSE = true
         end
       when /^-r(.+)?/
         opt = $1 || argv.shift
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]