I forgot the "@" in front of a variable that had the same name as the action - so Ruby interpreted it as a method call, not a variable reference.
It sounds like ruby did exactly what it should have done. There was a typo and you ended up calling a method. Even if ruby required parens for methods, you could have a typo missing the parens which would make it a local variable reference.
I would guess that a more common confusion with naked ruby methods is that they can be indistinguishable from local variables, and this isn't helped when people completely omit parens when passing params. This is why, despite some critisim of the practice, I pretty consistently use self and, when passing params, use parens.
The typo mistake and the "forget parens" mistake are quite different in quality, though. If I mean method call, it is very unlikely that I would forget the parens in a language that always has parens for method calls.
"If I mean method call, it is very unlikely that I would forget the parens in a language that always has parens for method calls."
If I mean instance variable, it is very unlikely that I would forget the @ in a language that always has an @ for instance variables. :-\
Maybe I'm missing something, but I don't see a fundamental distinction between the two purely on the basis of consistency. I think an argument could be made that the parens on a method are a more meaningful and representative syntax element than an @ on an instance variable, making it easier to remember. Then again, someone could argue that braces are a more meaningful syntax element than indentation, and we all know how that goes. :-)
It sounds like ruby did exactly what it should have done. There was a typo and you ended up calling a method. Even if ruby required parens for methods, you could have a typo missing the parens which would make it a local variable reference.
I would guess that a more common confusion with naked ruby methods is that they can be indistinguishable from local variables, and this isn't helped when people completely omit parens when passing params. This is why, despite some critisim of the practice, I pretty consistently use self and, when passing params, use parens.