Alex McHale wrote: > Alright, while that is very confusing to me (not the concept, I > understand what you said, just why the precedence is different), you > raise another question. > > In your example, you use the &bl syntax. I understand that if you > want the proc object, that is the syntax to use, but why use it in > that case? > > Wouldn't this give identical results? > > def foo(*args) > puts "foo got the block" if yield > end > > etc? Is the reason to use this construct because you want to demand > that a block be passed? > > And on that note, is there a syntax to determine whether or a block > was passed to the method, in the syntax of my construct? You're right, there's no reason to use the &bl notation. You can use the Kernel#block_given? method: def foo(*args) puts "foo got the block" if block_given? end But using 'if yield' is different: it tests the return value of the block, not the existence of the block.