# Re: Smalltalk's favorite Boolean method

**URL:** <https://www.ruby-forum.com/t/re-smalltalks-favorite-boolean-method/93829>\
**Category:** Ruby\
**Created:** [April 11, 2006, 3:47pm UTC](https://www.ruby-forum.com/t/re-smalltalks-favorite-boolean-method/93829 "2006-04-11T15:47:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [April 11, 2006, 3:47pm UTC](https://www.ruby-forum.com/t/re-smalltalks-favorite-boolean-method/93829/1 "2006-04-11T15:47:47Z")

</div>

> For a long time I have been programming Smalltalk.  
> Recently, Ruby “got me” and I was wondering how the  
> famous ifTrue:ifFalse: could be added to the System.
> 
> 1 = 2  
> ifTrue:  
> [Transcript show: “true!”]  
> ifFalse:  
> [Transcript show: “false!”]

How is this effectively different than:

if 1 == 2  
puts “true!”  
else  
puts “false!”  
end

???

Dan

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [April 11, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/re-smalltalks-favorite-boolean-method/93829/2 "2006-04-11T16:03:17Z")

</div>

On Tue, 11 Apr 2006, Berger, Daniel wrote:

> > For a long time I have been programming Smalltalk.
> 
> if 1 == 2  
> puts “true!”  
> else  
> puts “false!”  
> end

or even

1 == 2 ?  
puts(‘true’):  
puts(‘false’)

lean. mean. 😉

-a
