ruby-changes:59443
From: Nobuyoshi <ko1@a...>
Date: Tue, 24 Dec 2019 17:13:19 +0900 (JST)
Subject: [ruby-changes:59443] 5a62fb1277 (master): Mentioned `-W:` command option in NEWS [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=5a62fb1277 From 5a62fb1277fb351a1a11b89b0f8510c8f1a0cdff Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 24 Dec 2019 11:14:13 +0900 Subject: Mentioned `-W:` command option in NEWS [ci skip] diff --git a/NEWS b/NEWS index c34ffae..e6b6351 100644 --- a/NEWS +++ b/NEWS @@ -236,6 +236,30 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L236 * Refinements take place at Object#method and Module#instance_method. [Feature #15373] +* Command line option +-W+ has been extended with a following +:+, to manage categorized + warnings. [Feature #16345] [Feature #16420] + + # deprecation warning + $ ruby -e '$; = ""' + -e:1: warning: `$;' is deprecated + + # suppress the deprecation warning + $ ruby -W:no-deprecated -e '$; = //' + + # works with RUBYOPT environment variable + $ RUBYOPT=-W:no-deprecated ruby -e '$; = //' + + # experimental feature warning + $ ruby -e '0 in a' + -e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby! + + # suppress experimental feature warning + $ ruby -W:no-experimental -e '0 in a' + + # suppress both by using RUBYOPT + $ RUBYOPT='-W:no-deprecated -W:no-experimental' ruby -e '($; = "") in a' + + === Core classes updates (outstanding ones only) Array:: @@ -504,7 +528,7 @@ Warning:: https://github.com/ruby/ruby/blob/trunk/NEWS#L528 New methods:: * Added Warning.[] and Warning.[]= to manage emit/suppress of - some categories of warnings. [Feature #16345] + some categories of warnings. [Feature #16345] [Feature #16420] $LOAD_PATH:: -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/