Issue #10279 has been updated by Hiroshi SHIBATA.


trunk is same behaviour:

```
ruby 2.2.0preview1 (2014-09-17 trunk 47616) [x86_64-darwin13]
10279.rb:1: syntax error, unexpected modifier_if
h = { key: if true
```

----------------------------------------
Bug #10279: Syntax error on Hash with symbol syntax and nested expression: 2.1.3 regression 
https://bugs.ruby-lang.org/issues/10279#change-49047

* Author: Jack Montaach
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: core
* Target version: next minor
* ruby -v: 2.1.3
* Backport: 
----------------------------------------
The following gives syntax error on ruby 2.1.3

~~~
h = { key: if true
             "yes"
           else
             "no"
           end }

puts h.inspect
~~~

~~~
/usr/local/rvm/rubies/ruby-2.1.3/bin/ruby x.rb
x.rb:1: syntax error, unexpected modifier_if
h = { key: if true
             ^
x.rb:3: syntax error, unexpected keyword_else, expecting end-of-input
~~~

~~~
/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby x.rb
{:key=>"yes"}
~~~




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