> -----Original Message-----
> From: dave / thomases.com [mailto:dave / thomases.com] On Behalf 
> Of Dave Thomas
> Sent: Thursday, September 26, 2002 9:54 AM
> To: ruby-talk ML
> Subject: Re: call for commentary: review of Ruby for a 
> magazine (long, sorry!)
> 
> 
> William Djaja Tjokroaminata <billtj / z.glue.umd.edu> writes:
> 
> >             if obj.nil?: puts "warning"
> 
> > I think I have minimized my typing (good for my hands)
> 
> Except the conventional Ruby syntax
> 
>               puts "warning" if obj.nil?
> 
> is actually one less keystroke, and a shifted key one that (on my
> keyboard...)
> 

Interesting...I usually do:

puts "warning" unless obj 

Since obj is true if not nil

The "if obj.nil?" may appear clearer, but 'unless obj' is easy to 
grok as well.  And of course this works only for cases where obj
is not a boolean value...

-rich