From: dblack@... Date: 2006-12-14T01:58:15+09:00 Subject: map taking an argument (was: Re: join_with) Hi -- On Wed, 6 Dec 2006, Martin DeMello wrote: > While golfing with the hex_ip thread, I realised that map takes no > argument, and join takes no block, leaving a vacuum for a combined > method: Your point about map re-raised a question that was in my head recently. There was an RCR a while back, rejected by Matz, that asked for: enum.map(:m) to be the same as: enum.map {|e| e.m } It looks like Ruby >= 1.9 has this: enum.map(&:m) which strikes me as the same thing, functionally, but visually noisier and semantically more obscure. I'm just wondering what the rationale is for rejecting the simple version and introducing the less simple one. David -- Q. What's a good holiday present for the serious Rails developer? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) aka The Ruby book for Rails developers! Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)