>>>>> "H" == Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> writes:

 Difficult to explain because I don't speak english, it's better if you
look at eval.c and look for NODE_ITER and NODE_FOR

 NODE_ITER is used for 'each'
 NODE_FOR implement 'for' (see the call to rb_call(..., each,...) in NODE_FOR)

H> Then 'for' simply isn't syntactic sugar for the braces or for the
H> do...end.   It does a similar job, but does it differently.  The author

 It does a similar job, and do it the same way.

The difference is that 'each' introduce a dynamic scope, when 'for' don't 
introduce this scope.

 You have in the source of rb_yield_0

    if (block->flags & BLOCK_D_SCOPE) {
	/* put place holder for dynamic (in-block) local variables */
	ruby_dyna_vars = new_dvar(0, 0, block->d_vars);
    }
    else {
	/* FOR does not introduce new scope */
	ruby_dyna_vars = block->d_vars;
    }

H> So that rule about precedence has gone in 1.6?

 Apparently, yes

Guy Decoux