On Sep 22, 2005, at 1:01 PM, Trans wrote:

>> Why do you need the boolean behavior?
>>
>
> In particular, I use the boolean behavior to redefine an element of  
> the
> OpenStruct-like object under certain circumstances.
>
>   unless o.m  # could be null
>     o.m = foo
>
> Right now I'm using 'if o.m.nil?' but it's not nice. It means one must
> be aware of ths possibiliy of a null rather than nil. And what if  
> false
> plays a role? I don't want the end user to have to worry about it. It
> should be just like nil except not error when method missing.
>
> T.
>
>
>

Whats the problem with just doing

def nil.method_missing(*args)
        self
end

I think this might be an issue of having your cake and eating it too.