From: James Edward Gray II Date: 2006-01-11T04:54:43+09:00 Subject: Re: "chomping" an array at read time On Jan 9, 2006, at 12:28 PM, Ezra Zygmuntowicz wrote: > > On Jan 9, 2006, at 9:59 AM, James Edward Gray II wrote: > >> On Jan 9, 2006, at 11:53 AM, Ezra Zygmuntowicz wrote: >> >>> lus = File.open("test.txt") {|f| f.readlines} >> >> Or just: >> >> lus = File.readlines("test.txt") > > James- > > When you do that does it close the file handle as well? I was just > using the block to make sure the file handle gets closed. Are there > certain actions that will close the handle by themselves and others > that won't? Well, there's no way I know of to get at the file handle used here, so I sure hope it's closed. I would argue that it's a bug if it isn't. :) James Edward Gray II