From: Martin Boese Date: 2010-02-12T04:55:02+09:00 Subject: Re: Global rescue - DRY (don't repeat yourself) On Thu, 11 Feb 2010 17:18:26 +0900 Jan Roslind wrote: > Hi Martin. > Thanks for your suggestion. It Works. > But how do I access bindings (to find local variables) and self (to > find instance variables) from Code.try method. > Regards Jan Local and instance variables probably work as you expect: local = 'test' @instance = 'instance' Code.try do "#{local} #{@instance} #{self.class.name}" end => "test instance Object" -- Internet Technologies Angola / MAXNET Tel: +244 (227) 286 000 / (924) 770 290 / (924) 770 291 Mobile: +244 (927) 986 444 Mail: martin@internet.ao