From: dblack@... Date: 2007-07-11T20:23:29+09:00 Subject: Re: Beautiful Code : Pity he didn't ask here... ---2049402039-1406859260-1184153004=:13492 Content-Type: MULTIPART/MIXED; BOUNDARY="-2049402039-1406859260-1184153004=:13492" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---2049402039-1406859260-1184153004=:13492 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi -- On Wed, 11 Jul 2007, Pit Capitain wrote: > 2007/7/10, James Edward Gray II : >> I've also recently adopted the trick of using _ as an unused >> parameter name. I believe it was Ara that first suggested this and I >> think it's a great idea: >> >> hash.sort_by { |key, _| =85 }=85 > > Maybe it was Ara indeed, but the first reference I found on ruby-talk > was a post from Nikolai Weibull almost two years ago. See > ruby-talk:149793. Isn't that the same as: hash.sort_by {|key,| ... } (assuming one isn't going to make use of the value in _)? David --=20 * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com) ---2049402039-1406859260-1184153004=:13492-- ---2049402039-1406859260-1184153004=:13492--