diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-11-18 09:12:50 -0600 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-11-18 09:12:50 -0600 |
commit | 373769c93995abeeb546bdcd9e6527c77aefa1d4 (patch) | |
tree | cefefc55ddfe9d5616dfd6376ded994c0e1cdb57 /NEWS | |
parent | f09fc1b0344e65aeb9c11aaeb23c99954265fe4d (diff) | |
download | ruby-373769c93995abeeb546bdcd9e6527c77aefa1d4.tar.gz |
NEWS: Add an example for the warning of "yield in singleton class"
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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(...) |