NEWS: Add an example for the warning of "yield in singleton class"

This commit is contained in:
Yusuke Endoh 2019-11-18 09:12:50 -06:00
Родитель f09fc1b034
Коммит 373769c939
1 изменённых файлов: 7 добавлений и 0 удалений

7
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(...)