From: John Carter Date: 2007-09-06T13:28:08+09:00 Subject: Re: Missing "end" and My least favourite ruby error message.... On Thu, 6 Sep 2007, John Carter wrote: > "syntax error, unexpected $end, expecting kEND" > > With the line number pointing to the last line of the file. > > So I was busy doing something when I was interrupted and I dropped an > "end" somewhere. > > No idea where. > > Sigh! Time for a binary chop search. > > I wish I could think of an easier way, like the highlighting emacs > does for '(; and '{' Binary chop was useless. Wherever I put an "end", it would compile! It took me ages to review it line by line and spot it.... blah.each do |line| foo.bah( line) foo.blech foo. end Ruby helpfully thought I was invoking the "end" method on the object in the foo variable. Sigh! John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand