On Feb 11, 2007, at 8:28 PM, Victor "Zverok" Shepelev wrote:
> Thanks, Gary.
> I suppose, it's the only way to have constants from some module  
> visible
> inside some_object.instance_eval ?

Maybe someone else will come up with something but I think the main
problem is that instance_eval with a code block does not actually
provide the same binding context as a method definition within a class
block.  That is what led me to grabbing the exact context you were
looking for with Kernel#binding and using the string version of eval.

I haven't reviewed the Ruby 1.9 constant lookup changes recently but
I think that they lean towards a more 'dynamic' rather than
'lexical' approach, which seems to be what a lot of people expect and
get surprised by in Ruby 1.8.X.

Gary Wright