* [ruby-core:93354] [Ruby trunk Bug#15957] Splatting nil as **kwargs
[not found] <redmine.issue-15957.20190625050732@ruby-lang.org>
@ 2019-06-25 5:07 ` tietew
0 siblings, 0 replies; only message in thread
From: tietew @ 2019-06-25 5:07 UTC (permalink / raw
To: ruby-core
Issue #15957 has been reported by Tietew (Toru Iwase).
----------------------------------------
Bug #15957: Splatting nil as **kwargs
https://bugs.ruby-lang.org/issues/15957
* Author: Tietew (Toru Iwase)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-06-24T15:19:49Z trunk e09afd15b7) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Splatting nil as *array is ignored silently.
```ruby
[1, *nil]
# => [1, 2]
```
But splatting nil as **kwargs raises TypeError.
```ruby
{foo: 1, **nil}
# => no implicit conversion of nil into Hash (TypeError)
```
Is this intentional?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-25 5:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-15957.20190625050732@ruby-lang.org>
2019-06-25 5:07 ` [ruby-core:93354] [Ruby trunk Bug#15957] Splatting nil as **kwargs tietew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).