From: Trans Date: 2005-11-12T22:22:14+09:00 Subject: Execute block in context of yielding method's module Mental block. Is there a reasonable way to do this? def dothis ; puts "NO!" ; end module M class << self def dothis puts "THIS" + @number.to_s end def wrap( n, &yld ) old = @number @number = n yld.call @number = old end end end M.wrap( 10 ) do dothis end This produces "NO!". How do I get it to execute the block in the context of M, so that it produces "THIS10" (w/o having to out M.dothis). Thanks, T.