From: "Hal E. Fulton" Date: 2002-11-26T10:33:38+09:00 Subject: Re: Default value of property ----- Original Message ----- From: "Hal E. Fulton" To: "ruby-talk ML" 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