summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-24 13:24:41 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-24 13:24:41 +0900
commitadf498b84f56e57b74b72a3ddcc512f6d2078cef (patch)
tree75e663b92bee1f3e46bdf4c865ef582265cbcea0 /NEWS
parent302e896833bc611ba39c8697712313fd2dbd70cc (diff)
Moved warning option section and added a reference [ci skip]
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS56
1 files changed, 31 insertions, 25 deletions
diff --git a/NEWS b/NEWS
index 36d7af3e9e..b14cfdf7fa 100644
--- a/NEWS
+++ b/NEWS
@@ -236,6 +236,37 @@ sufficient information, see the ChangeLog file or Redmine
* Refinements take place at Object#method and Module#instance_method. [Feature #15373]
+=== Command line option
+
+==== Warning option
+
++-W+ option has been extended with a following +:+, to manage categorized
+warnings. [Feature #16345] [Feature #16420]
+
+* To suppress the deprecation warning:
+
+ $ ruby -e '$; = ""'
+ -e:1: warning: `$;' is deprecated
+
+ $ ruby -W:no-deprecated -e '$; = //'
+
+* It works with the +RUBYOPT+ environment variable:
+
+ $ RUBYOPT=-W:no-deprecated ruby -e '$; = //'
+
+* To suppress 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!
+
+ $ ruby -W:no-experimental -e '0 in a'
+
+* To suppress both by using +RUBYOPT+, set space separated values:
+
+ $ RUBYOPT='-W:no-deprecated -W:no-experimental' ruby -e '($; = "") in a'
+
+See also Warning in {Core classes updates}[#label-Core+classes+updates+-28outstanding+ones+only-29].
+
=== Core classes updates (outstanding ones only)
Array::
@@ -683,31 +714,6 @@ profile.rb, Profiler__::
* Removed from standard library. It was unmaintained since Ruby 2.0.0.
-=== Command line option
-
-* +-W+ option 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'
-
=== C API updates
* Many <code>*_kw</code> functions have been added for setting whether