dt1000
dt1000

Reputation: 3732

syntax error, unexpected ',', expecting ')'

I just installed Ruby 1.9.2 after having used 1.8.7, as there is a feature I need. I had called many of my methods like this:

do_something (arg0, arg1)

With 1.9.2, i get the following error, syntax error, unexpected ',', expecting ')' and the fix seems to be:

do_something arg0, arg1

But this could take me hours to fix all the cases. Is there a way around this? Why is it an error in the first place? thanks

Upvotes: 15

Views: 45307

Answers (1)

Paweł Obrok
Paweł Obrok

Reputation: 23164

The extra space is the culprit. Use:

do_something(arg0, arg1)

Upvotes: 43

Related Questions