Eric Mahurin wrote:
> This is be best I could come up with for determining whether an
> object is an immediate (Fixnum, Symbol, false, true, nil,
> others?):
>
> begin
>   obj.clone
>   # clone worked - not an immediate
> rescue TypeError
>   # clone failed - immediate
> end
>
> Anybody have a better way?  If the above is the best, seems
> like an Object#immediate? would be nice to have.

I wonder why you need this. I suspect becuase you're using #clone in a
general situation and want to test to make sure before doing so?
Perhaps not. But in either case, I'm not sure why #clone (or #dup) just
doesn't return self for these. I mean if they are immediate and hence
there is but "one", then why isn't the one a satisfactory clone? Is
there a good reason not to do this?

Thanks,
T.