An interesting difference, though, is that the Smalltalk version 
utilizes the language's capability to accept multiple blocks in a method 
call -- 'ifTrue: [ ... ] ifFalse: [ ... ]'.  In the Ruby version given, 
it needs to have a (may be) hack to return the value of the original 
condition, from the 'if' block.

JS

Austin Ziegler wrote:
> On 11/30/05, Jules Jacobs <julesjacobs / gmail.com> wrote:
> 
>>Hi, I have a question about Ruby if constructs. Why aren't they like
>>smalltalk if's, where you have a boolean class and two subclasses: true
>>and false. They both have these methods: ifTrue and ifFalse. If you use
>>a block with a ifTrue on a True object, it will be yielded. If you use
>>it on a false object, nothing will happen.
> 
> 
> They aren't like Smalltalk ifs because Ruby isn't Smalltalk. That
> said, people have been able to make things that work remarkably
> similar to the Smalltalk stuff. Do a search in the archives and you
> should find it.
> 
> -austin
> --
> Austin Ziegler * halostatue / gmail.com
>                * Alternate: austin / halostatue.ca
>