ruby-changes:59244
From: Kazuhiro <ko1@a...>
Date: Sat, 14 Dec 2019 16:06:53 +0900 (JST)
Subject: [ruby-changes:59244] 90cdcefa78 (master): Update warnings in NEWS
https://git.ruby-lang.org/ruby.git/commit/?id=90cdcefa78 From 90cdcefa78ee9f3c7c78db2c5f3df0fdba25d83f Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Sat, 14 Dec 2019 16:05:15 +0900 Subject: Update warnings in NEWS diff --git a/NEWS b/NEWS index c7dd2b3..4c8f105 100644 --- a/NEWS +++ b/NEWS @@ -127,8 +127,8 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L127 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 https://github.com/ruby/ruby/blob/trunk/NEWS#L138 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 https://github.com/ruby/ruby/blob/trunk/NEWS#L189 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] -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/