From: "Justin D." Date: 2011-03-21T05:55:45+09:00 Subject: Re: Name generator | I need feedback Thanks a lot anurag! Your answer is exactly what I wanted =) > A better alternative since the block invocation automatically takes > care of closing the file: > > lines = File.open(filename) {|f| f.readlines} > > or just, > > lines = File.readlines(filename) Does File.open opens in "r" or "w"? -- Posted via http://www.ruby-forum.com/.