array splatting a nil works, but hash splatting a nil does not
TypeError: no implicit conversion of nil into Hash
#3 [ruby-core:64296] Updated by marcandre (Marc-Andre Lafortune) over 3 years ago
- Assignee set to matz (Yukihiro Matsumoto)
* uses explicit conversion to array (
** uses implicit conversion to hash (
So your question about
nil can be explained this way, since
nil.to_a #=>  but
nil.to_hash is not defined.
The real question is then: shouldn't
** be using explicit conversion to hash with to_h?