From: Jakub Travnik Date: 2001-11-25T04:18:30+09:00 Subject: [ruby-talk:26359] Re: what's the & in parameter listings? Tobias DiPasquale wrote: > Hi, > > What does the '&' signify in parameter listings? I have seen it in > such places as "def add(*params, &block)", but am not sure what it > means? Does it have the same significance as it does in C? > No, it is the way to pass block around. following codes are equivalent: 1: a.each { something } 2: x=proc{ something } a.each &x 3: def someproc(b,&block_for_me) b.each &block_for_me end someproc(a) { something } Jakub Travnik jabber://jtra@jabber.com ICQ: 66770334 (deprecated)