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

NEWS: marked up **nil [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2019-09-28 13:51:27 +09:00
parent d474243e8c
commit 550a6a6bc1
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

6
NEWS
View file

@ -66,9 +66,9 @@ sufficient information, see the ChangeLog file or Redmine
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