From: Mike Sassak Date: 2009-08-20T02:40:25+09:00 Subject: Re: Confirm my Performance Test Against Java? --0050450176ba096c0d04718221f5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Aug 19, 2009 at 1:26 PM, Joel VanderWerf wrote: > Mike Sassak wrote: > >> Argh! That gist should be http://gist.github.com/170476. Sigh... >> > > And you can even, with another ounce of ruby-love, rewrite that as: > > num = 0 > ARGF.each do |l| > num += l.split.length > end > > Then it also works with stdin or multiple filenames on the cmdline. > > I'll leave it to others to #inject... ;) > Ha! I wrote it with inject initially, but then thought, "Nah... I don't want to blow *too* many minds." :-) --0050450176ba096c0d04718221f5--