> One thing that you emphasized and which is confusing is that the
> singleton class notation:
>
> class <<object
> end
>
> does *not* create a new lexical scope - nor does class_eval or
> instance_eval.
>

No, it *does* create a new lexical scope -- did you test it ? :)

o = Object.new
j = 10

class << o
  puts j
end

NameError: undefined local variable or method `j'

This was the point of my post -- that you can't simply use the 'lexical 
scope' argument (as you can with class_eval); that this is a genuine 
quirk of class variables in ruby :)

-- 
Posted via http://www.ruby-forum.com/.