seattlerb/ruby_parser — Issue #32: Error parsing ternary that contains a function call without parens
Author: camertron
Created: 2012-02-24 17:28:46+00:00
State: open

The following line of valid Ruby fails to parse with the error: parse error on value "user" (tIDENTIFIER)

`user.email ? h user.email : "N/A"`

It's complaining that it wasn't expecting "user" right after h. My guess is it thinks h is an identifier, not a function call. Wrapping user.email in parens parses just fine:

`user.email ? h user.email : "N/A"`

Thanks!