From: Josh Cheek Date: 2011-11-29T10:05:18+09:00 Subject: Re: Is high-speed sorting impossible with Ruby? --f46d0444691959f97204b2d53613 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2011/11/28 Matthias W=E4chter > A similar solution, at first glance only marginally different, is the > following: > > $stdin.gets >> puts $stdin.each_line.sort_by(&:to_**i) >> > > Besides the fact that this solution is slower than yours, it uses a neat > little technique of Ruby 1.9, Enumerators. $stdin is already enumerable, so each_line isn't necessary puts $stdin.drop(1).sort_by(&:to_i) --f46d0444691959f97204b2d53613--