From: Dave Thomas Date: 2001-09-08T01:14:09+09:00 Subject: [ruby-talk:20984] Re: destructor "Nat Pryce" writes: > class Resource > def Resource.use( param ) > resource = Resource.new( param ) > try > return yield( resource ) > ensure > resource.close > end > end > end You know - I think that's a pattern... Maybe we should adopt something like this in the libraries we write, rather than having the "if it takes a block..." Dave