From: Brian Candler Date: 2004-10-09T18:11:15+09:00 Subject: Re: quality of error messages On Sat, Oct 09, 2004 at 04:37:23AM +0900, Markus wrote: > So, in summary, I suspect that I would be happy with this rule but > almost everyone else would be happier with the modified (< vs. <=) > version I suggested earlier on this thread, which would allow: > > starting thing > guts > intestines > gizzards > end > > instead of the salient form: > > > starting thing > guts > intestines > gizzards > end > > which would be expected by the rule as stated. Yeah, I know. That was something I glossed over, because I didn't want to think it through :-) I think that: if a line begins with 'end', then you process it (reduce the nesting level) *before* checking whether the line's indentation level matches what you expect. And if there's more than one, I suppose you have to process them all, in case anyone writes something silly like class Foo; def bar; begin puts "hello" end; end; end Another construct which may cause difficulty is case foo when /bar/ ... else ... end since I've seen other ways of laying this out. Regards, Brian.