@lothcat said:
@dan rathbun said:
FYI: There is a missing ) in line 5 of the snippet.
D'oh! Thank you! I was so sure I was using this wrong that I didn't even look for actual coding errors.
Usually the Ruby error tells you what line of the code that the error is in, and echos that erroneous line.
Also it may print an extra line beneath the erroneous line with a caret symbol pointing at where it thinks the error is. Not always helpful, as it may just point at the end of the code line if the parser doesn't really know, for instance, where the missing ")" symbol should go.
And.. a syntax error IS a coding error, most often missing delimiters, brackets, etc.