1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update warnings in NEWS

This commit is contained in:
Kazuhiro NISHIYAMA 2019-12-14 16:05:15 +09:00
parent e2708068ad
commit 90cdcefa78
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

10
NEWS
View file

@ -127,8 +127,8 @@ sufficient information, see the ChangeLog file or Redmine
You can still define a local variable named _1 and so on, and that is honored when present, but renders warning.
_1 = 0
[1].each { p _1 } # prints 0 instead of 1, but also warns.
_1 = 0 #=> warning: `_1' is used as numbered parameter
[1].each { p _1 } # prints 0 instead of 1
==== proc/lambda without block is deprecated
@ -138,7 +138,7 @@ sufficient information, see the ChangeLog file or Redmine
def foo
proc
end
foo { puts "Hello" } #=> warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
foo { puts "Hello" } #=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
* Kernel#lambda with no block in a method called with a block raises an exception.
@ -189,10 +189,10 @@ sufficient information, see the ChangeLog file or Redmine
def foo
class << Object.new
yield
yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575]
end
end
foo { p :ok } #=> warning: `yield' in class syntax will not be supported from Ruby 3.0.
foo { p :ok }
* Argument forwarding by <code>(...)</code> is introduced. [Feature #16253]