Actions
Bug #10024
closedArray injection of ternary operators injects boolean rather than ternary result
Bug #10024:
Array injection of ternary operators injects boolean rather than ternary result
Description
The following code:
renders [true].
I would expect it to render ['blank']
If I wrap it in parenthesis it does work.
it seems like the logic internally is perceiving this function as:
Which seems illogical.
Updated by pducks32 (Patrick Metcalfe) about 12 years ago
The #<< has a higher precedence than the ternery operator. Using #<<= seems to make it work just fine.
Updated by nobu (Nobuyoshi Nakada) about 12 years ago
- Description updated (diff)
- Status changed from Open to Rejected
<< and >> are shift operators primarily, and have higher precedence.
Actions