Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional 1>2?'1':'' (no spaces) raises syntax error #3344

Closed
pbosetti opened this issue Dec 13, 2016 · 0 comments
Closed

Conditional 1>2?'1':'' (no spaces) raises syntax error #3344

pbosetti opened this issue Dec 13, 2016 · 0 comments

Comments

@pbosetti
Copy link
Contributor

@pbosetti pbosetti commented Dec 13, 2016

The conditional

 1>2?'greater':'smaller'

throws a syntax error, unexpected tLABEL_END, while is valid in standard ruby.

Conversely, the conditional

1>2?'greater' :'smaller'

correctly returns "smaller". Note the space before the column.

@matz matz closed this as completed in fead715 Dec 13, 2016
matz added a commit that referenced this issue Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant