Issue #14201 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #14201: Regression due to over optimization of hash splat
https://bugs.ruby-lang.org/issues/14201

* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 2.5
* ruby -v: 2.5.0-rc1 & trunk
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
The following doesn't print anything nor raise anything in 2.5.0-rc1 or trunk:

```
$ ruby -e "{**puts('hello')}; 42"
```

It should be the same as in Ruby 2.0-2.4:
```
hello
-e:1:in `<main>': no implicit conversion of nil into Hash (TypeError)
```

Note: If you try to use the hash (e.g. passing as argument, storing in variable), then the correct behavior takes place. Found this bug through DeepCover's test suite.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>