From: Su Zhang Date: 2010-11-30T02:23:44+09:00 Subject: Re: Confusion about singleton method definition The context is expected to differ from the top level inside myobj.outer_const as well as inside instance methods of inner_const, because they are binding-identical singleton methods. MYCONST in both palces binds to the same `self', which is myobj =) puts "Top level: #{self}" myobj = Object.new class << myobj def foo puts "class << myobj; def foo: #{self}" end end def myobj.bar puts "def myobj.bar: #{self}" end myobj.foo myobj.bar -- Posted via http://www.ruby-forum.com/.