From: Brian Adkins Date: 2008-03-27T22:19:53+09:00 Subject: Re: Passing params to Map method On Mar 24, 11:57 pm, "David A. Black" wrote: > ... > find and map are not being passed any arguments; rather, they're being > given code blocks, and those blocks are being passed arguments. > (name,) is block parameter syntax for grabbing one element of an array > and putting it in name. From your description "block parameter syntax", someone might conclude that this is something specific to blocks, but it's more generally the syntax for destructuring an array. For example: (x,) = [7,8,9] # x => 7 (x,y,z) = [7,8,9] or even x, = [7,8,9] In the OP's example, I think map {|a| a[0] } is clearer, but if the parameter is used multiple times, e.g. map {|a,| "#{a}-#{a}" }, then assigning to 'a' initially is more concise.