From: James Harrison Date: 2010-07-26T00:14:31+09:00 Subject: Re: assign blocks to variables On Jul 25, 2010, at 9:00 AM 7/25/10, poseid wrote: > If you want to work on a function that takes a block as input, is it > possible to assign the block to a variable? > In other words, how would you parameterize this in irb: > > myfunc { > otherfunc { |a| > print a > } > } > > You hand blocks in as a variable to a function by prepending a variable name with an ampersand: myfunc(&block) Is that what you're looking for?