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

syntax error on rails 3.0/raby 1.9? #12

Closed
papayaah opened this issue Sep 27, 2010 · 4 comments
Closed

syntax error on rails 3.0/raby 1.9? #12

papayaah opened this issue Sep 27, 2010 · 4 comments

Comments

@papayaah
Copy link

On this block specifically both on the when clause.

def make_option name, value, type=:string
"--#{name.gsub('_', '-')} " + case type
when :boolean: ""
when :numeric: value.to_s
else "'#{value}'"
end + " "
end

@phoet
Copy link

phoet commented Sep 28, 2010

this syntax is incompatible with ruby 1.9

you need to explicitly replace the last colon with a then like:

    when :boolean then ""
    when :numeric then value.to_s

@papayaah
Copy link
Author

thanks for the solution

@phoet
Copy link

phoet commented Sep 30, 2010

@unixmonkey
Copy link
Collaborator

This was fixed in September, 2010 with this commit:
fc48bae

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

3 participants