aboutsummaryrefslogtreecommitdiffstats
path: root/NEWS
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-11-18 09:12:50 -0600
committerYusuke Endoh <mame@ruby-lang.org>2019-11-18 09:12:50 -0600
commit373769c93995abeeb546bdcd9e6527c77aefa1d4 (patch)
treecefefc55ddfe9d5616dfd6376ded994c0e1cdb57 /NEWS
parentf09fc1b0344e65aeb9c11aaeb23c99954265fe4d (diff)
downloadruby-373769c93995abeeb546bdcd9e6527c77aefa1d4.tar.gz
NEWS: Add an example for the warning of "yield in singleton class"
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS7
1 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6f740e4c48..ce462d542c 100644
--- a/NEWS
+++ b/NEWS
@@ -188,6 +188,13 @@ sufficient information, see the ChangeLog file or Redmine
* +yield+ in singleton class syntax is warned and will be deprecated later [Feature #15575].
+ def foo
+ class << Object.new
+ yield
+ end
+ end
+ foo { p :ok } #=> warning: `yield' in class syntax will not be supported from Ruby 3.0.
+
* Argument forwarding by <code>(...)</code> is introduced. [Feature #16253]
def foo(...)