summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-24 11:14:13 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-24 11:14:16 +0900
commit5a62fb1277fb351a1a11b89b0f8510c8f1a0cdff (patch)
tree928cab2ef69e9db5d8d333d2c8d0188978f55368
parentf2e1e6cba451375d8eb839bf2e7c9a39bccc044c (diff)
Mentioned `-W:` command option in NEWS [ci skip]
-rw-r--r--NEWS26
1 files changed, 25 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c34ffaeca2..e6b6351bed 100644
--- a/NEWS
+++ b/NEWS
@@ -236,6 +236,30 @@ sufficient information, see the ChangeLog file or Redmine
* 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::
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::