From: "Paul Brannan" <pbrannan / atdesk.com>
> On Tue, Apr 23, 2002 at 12:19:43AM +0900, Nat Pryce wrote:
> > E.g. in Ruby a user defined control structure if-then-else block would
look
> > like this, which is more awkward than the built in if statement:
> >
> > if some_test proc do
> >     something
> > end, else proc do
> >     something_else
> > end
>
> This seems very awkward to me, much more so than passing two procs to a
> single method.  I didn't even realize this syntax was legal.

Yes I meant to write something that would pass a boolean and two procs to a
method, but obviously still had my Smalltalk head on!  A correct Ruby
version would be like this (I'll use the name myIf because if is a reserved
word):

def myIf( a_boolean, &then, &else )
    ... implementation here ...
end

...

myIf( x > 0, proc do
    something
end, proc do
    something_else
end )