----- Original Message ----- 
From: "Hal E. Fulton" <hal9000 / hypermetrics.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Monday, November 25, 2002 7:24 PM
Subject: Re: Default value of property


> 
> Well... one way would be
> 
>   class NilClass
>     def method
>       default_value
>     end
>   end
> 
> But many will frown on this, and it
> only works for *one* case anyway...
> 
> Hal

Sorry to reply to myself... 

I did try this, which doesn't work:

  x = obj.property.meth rescue default_value

I'm not sure why it doesn't work, and I think
it would be nice if it did.

Hal