From: Michael Linfield Date: 2008-04-07T04:13:12+09:00 Subject: Re: memory allocation failure: heavy files Robert Klemme wrote: > On 06.04.2008 00:52, Michael Linfield wrote: >> Effect achieved via: >> >> @store = [] >> IO.foreach("testpart.txt"){|x| @store << x.split(" ").grep(/#{format}/)} >> >> #format is a Regexp > > If format is a regular expression why then don't you do > "...grep(format)"? > > Kind regards > > robert Just a habit, both ways work. -- Posted via http://www.ruby-forum.com/.