From: Shea Martin Date: 2006-03-21T04:53:49+09:00 Subject: Re: passing block to another function Shea Martin wrote: > I suspect that this is possible, but I can't seem to nail the syntax. Ok, The following works, is this the def worker( p_num, &p_block ) for i in 0...p_num p_block.call( i ) end end def five_times( &p_block ) worker( 5 ){ |x| p_block.call(x) } end five_times { |i| puts "#{i}. hello" } .. ~S