From: Abirami Selvam Date: 2009-03-23T17:34:49+09:00 Subject: Re: Reg IO class Robert Klemme wrote: > On 23.03.2009 06:58, Abirami Selvam wrote: >> Hi, >> Should we close the file after reading it? > > Yes, of course. > >> It is working fine, even without closing the file(diskfile.close). Can >> someone suggest me. Does the file close automatically or not? > > In the first line yes, in the second chunk, no. This can be easily > fixed by using the block form of File.open. > > Cheers > > robert Thank you for your qucik reply -- Posted via http://www.ruby-forum.com/.