From: MikkelFJ Date: 2003-05-20T00:55:59+09:00 Subject: Re: An Object Going Out Of Scope "MikkelFJ" wrote in message news:3ec7e99c$0$83055$edfadb0f@dtext01.news.tele.dk... > { auto(:foo, :cleanup); foo = foo.new } # calling foo.cleanup on scope exit Thinking about it... isn't this what ensure does? begin foo.new ensure foo.cleanup end or from PickAxe f = File.open("testfile") begin # .. process rescue # .. handle error else puts "Congratulations-- no errors!" ensure f.close unless f.nil? end Mikkel