On Thursday 27 May 2004 14:24, Hal Fulton wrote:
> Sean O'Dell wrote:
> > TrueClass responds to "clone" but when you call it, the method just
> > throws an error that says "can't clone TrueClass."  How can I tell when
> > an objects support a given method if they implement them but then raise
> > exceptions?  Is there some other methodology I should use?
>
> Interesting question. I suppose you could always catch the exception
> and then set your own flag that says you can't clone.

That sort of makes respond_to? less functional than advertised.

> This raises the question in my mind of whether the clone method should
> simply be removed from such classes.

My feeling is, it should be removed.  I would think that the rule of thumb is 
"if it respond_to?'s, it is implemented."

	Sean O'Dell