>>>>> "R" == Robert Klemme <bob.news / gmx.net> writes:

R> def foo(&b)
R>   [1].each &b
R>   puts c
R> end
R> foo { c = 0 }

R> 'c' comes into existence in the lexically surrounding scope, i.e. foo in
R> the first case and the calling context in the second case.  There is no
R> magic that would make the second example print something other than 'nil'
R> for 'c'.

 Well, it will just give

   in `foo':  undefined local variable or method `c'


 :-)


Guy Decoux