From: Eleanor McHugh Date: 2010-07-11T00:10:01+09:00 Subject: Re: what about allowing to specify, which end belongs to which start? On 9 Jul 2010, at 20:05, Jan Lelis wrote: > If you specify it, and it does not match, the compiler throws an error. > Of course, you can always omit it to have the normal behaviour, but you > are encouraged to often "document", which end belongs to which block > (and you do yourself a favour in these nested situations). > > What do you think about it? Jan, it's not in Ruby's nature to hold your hand so whilst I can't see any particular technical reason for having such an _optional_ syntax extension, I'd be uncomfortable with code that relied upon them. In any event the underlying problem you're describing is one which in the vast majority of cases is a code smell and is best dealt with by aggressive refactoring. Move the inner loops into their own method calls, or write your outer-loop logics as a method taking a block and drive iteration/whatever that way. The resulting code will be much easier to read and maintain, and the generality will improve your code reuse options. Ellie Eleanor McHugh Games With Brains http://feyeleanor.tel ---- raise ArgumentError unless @reality.responds_to? :reason