From: Peter Alvin Date: 2010-01-21T20:09:59+09:00 Subject: Ruby equivalent of C# "using keword" and IDispose What is the most expedient way to do this C# construct in Ruby? C#: using (myObj = new MyClass()) { // misc code here } //MyClass.Dispose automatically called here I wish to put stuff in MyClass.Dispose() to release resources... it must always be called. Pete -- Posted via http://www.ruby-forum.com/.