From: tamouse mailing lists Date: 2013-03-26T03:41:59+09:00 Subject: Re: Confusion with Array#map On Mon, Mar 25, 2013 at 1:37 PM, Love U Ruby wrote: > Joel Pearson wrote in post #1103136: >> map iterates through the given array and collects the results with a >> block executed on them, in this case interpreting the argument symbol >> :capitalize into a proc { |s| s.capitalize } > > > How `proc` object is getting called by `call` to produce the output? Who > is calling that? The operator "&" is the block operator, which is turning the symbol :capitalize which refers to the method capitalize in that context. Since at that point, map is sending in strings, it says to call the capitalize method on that string. https://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#The_Ampersand_Operator