From: Paul McKibbin Date: 2011-03-04T02:39:49+09:00 Subject: Re: Extracting the shortest string from an array --002215b02d827ab9d8049d978355 Content-Type: text/plain; charset=ISO-8859-1 Very true array.min_by{|a| a.size} would also do the trick. Paul On Thu, Mar 3, 2011 at 3:11 PM, Jeremy Bopp wrote: > On 3/3/2011 09:01, Adam Hegge wrote: > > array.min{|a,b| a.size <=> b.size } > > You can actually simplify this even more. Take a look at > Enumerable#min_by: > > http://rdoc.info/stdlib/core/1.8.7/Enumerable:min_by > > -Jeremy > > --002215b02d827ab9d8049d978355--