From: Xavier Noria Date: 2007-11-17T14:20:51+09:00 Subject: Re: "instance_eval" (eg, sent to a class object) On Nov 16, 2007, at 11:00 PM, Rick DeNatale wrote: > It only affects the execution context by binding self to the instance, > NOT the lexical context. This is related to another thread about constant name resolution (subject "constant name resolution and module_eval"). Why then *_eval (BLOCK|STRING) behave different? C = "Object" class String C = "String" end a = '' a.instance_eval do def c_in_block; C; end end a.instance_eval < Object puts a.c_in_string # -> String Looks like there's a "current" module for constant name resolution, and another "current" module for method definition etc. -- fxn