On Friday, October 8, 2004, 3:38:38 PM, Hal wrote: > It would be theoretically possible to match by indentation as well as > keyword (solely for these purposes, and only with -c). > For example: > 1| class Foo > 2| class Bar > 3| def mymeth(x) > 4| if x.nil? > 5| puts "x is nil" > 6| end > 7| end > 8| end > If we do this kind of guessing, we will guess that there is a missing end > after line 5. (Because the end doesn't match the indentation of the 'if' > to which it corresponds.) > If we don't, we will go past line 8 until we hit something we can't handle. > It may be line 10 or line 999. > This is a very common error for me, and I have thought of writing a little tool > just to find missing ends (since my own indentation is always consistent enough > to allow it). Interesting that you haven't written the tool yet :) Gavin