ruby-changes:57999
From: Nobuyoshi <ko1@a...>
Date: Sat, 28 Sep 2019 13:52:11 +0900 (JST)
Subject: [ruby-changes:57999] 550a6a6bc1 (master): NEWS: marked up `**nil` [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=550a6a6bc1 From 550a6a6bc1be4ff9aa6b65f6ad9b45c3fa2d1344 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 28 Sep 2019 13:51:27 +0900 Subject: NEWS: marked up `**nil` [ci skip] diff --git a/NEWS b/NEWS index 73be13e..958385f 100644 --- a/NEWS +++ b/NEWS @@ -66,9 +66,9 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L66 def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} -* **nil is allowed in method definitions to explicitly mark that the - method accepts no keywords. Calling such a method with keywords will - result in an ArgumentError. [Feature #14183] +* <code>**nil</code> is allowed in method definitions to explicitly mark + that the method accepts no keywords. Calling such a method with keywords + will result in an ArgumentError. [Feature #14183] def foo(h, **nil); end; foo(key: 1) # ArgumentError def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/