ruby-changes:58826
From: Yusuke <ko1@a...>
Date: Tue, 19 Nov 2019 00:27:08 +0900 (JST)
Subject: [ruby-changes:58826] 373769c939 (master): NEWS: Add an example for the warning of "yield in singleton class"
https://git.ruby-lang.org/ruby.git/commit/?id=373769c939 From 373769c93995abeeb546bdcd9e6527c77aefa1d4 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Mon, 18 Nov 2019 09:12:50 -0600 Subject: NEWS: Add an example for the warning of "yield in singleton class" diff --git a/NEWS b/NEWS index 6f740e4..ce462d5 100644 --- a/NEWS +++ b/NEWS @@ -188,6 +188,13 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L188 * +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(...) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/