From: "Brian Schröder" Date: 2004-11-30T03:32:20+09:00 Subject: Re: Another improved error message request On Tue, 30 Nov 2004 03:17:57 +0900 "DaZoner" wrote: > > I don't know if this case has been requested yet so sorry for the noise if > it has. > > It would be nice if this code: > > 100.times | i | > puts i > end > > .... reported that the "do" is missing on line 1 rather than saying syntax > error on line 2. The error can be difficult to find when you have nested > loops and much intervening code. > > This would indeed be nice, because I catch myself making this error also often. Somehow the do seems superfluent. But I don't think it would be possible to detect this always, because the | are parsed as bitwise or's, so there is only a superfluous end. The proposed indentation heuristic would give a correct result. So the missing end patch would help here. (If I remember the thread correctly) Regards, Brian -- Brian Schr�der http://www.brian-schroeder.de/