From: tietew@... Date: 2019-06-25T05:07:32+00:00 Subject: [ruby-core:93354] [Ruby trunk Bug#15957] Splatting nil as **kwargs 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/ Unsubscribe: