From: Brian Candler Date: 2010-04-11T18:17:58+09:00 Subject: Re: question about pickaxe code example Chuck Taylor wrote: > in chapter 12 of pickaxe in the tutthreads_10.rb example there is a line > > threads.each(&:join) > > that appears to be doing what you would expect from the line > > threads.each {|t| t.join} > > I'm wondering if anyone could point me at a more general description of > how this bit of code is doing something like turning a symbol into a > code block? (this is totally a guess on my part) You're right, and Symbol#to_proc is what to Google for to get the full details. http://pragdave.pragprog.com/pragdave/2005/11/symbolto_proc.html -- Posted via http://www.ruby-forum.com/.