From: Mark Cox Date: 2003-12-09T12:42:07+09:00 Subject: Adjusting the Scope of Blocks Hi, Is there a way to give a block associated with a method call the same scope as if it were executing inside the method. ie. class Foo ACONST = 1 def input_flags @FLAG_SEL = INPUT yield end def output_flags @FLAG_SEL = OUTPUT yield end def set(flgs) set_flags(@FLAG_SEL, flgs) end end f = Foo.new f.input_flags { set ACONST } f.output_flags { set ACONST } Thanks in advance. Mark Cox