"OR" Operator must be placed at end of previous line? (unexpected tOROP)
Posted
by
akonsu
on Stack Overflow
See other posts from Stack Overflow
or by akonsu
Published on 2012-11-21T21:49:41Z
Indexed on
2012/11/21
22:59 UTC
Read the original article
Hit count: 244
I am running Ruby 1.9.
This is a valid syntax:
items = (data['DELETE'] || data['delete'] ||
data['GET'] || data['get'] || data['POST'] || data['post'])
But this gives me an error:
items = (data['DELETE'] || data['delete']
|| data['GET'] || data['get'] || data['POST'] || data['post'])
t.rb:8: syntax error, unexpected tOROP, expecting ')'
|| data['GET'] || data['get'] |...
^
Why?!
© Stack Overflow or respective owner