> > But it based on whether object has "to_str" or not.  I know Ruby still
> > does type testing.  But it is evloving.
>
> This made me take a second look at my to_str example....  In 1.6.7
> File#open doesn't seem to look for to_str, but it does in 1.7.  So
> I semi-retract my previous observation :-)

:-)

coming from a bit different background (i.e. mainly java) i find this
discussion interesting.  if i would follow this policy in java, i would
change method arguments of type java.lang.String into java.lang.Object and
internally invoke String.valueOf( o ) or toString() if i want to recognize
'null's.  this seems odd to me since i would loose information about the
interface.  and since toString() is defined in class Object, everybody can
do this conversion easily before the method call.  so - at least for java -
i would opt against this policy.

i'd like to know, what you folks say about this: is it a general matter or
is this distinction connected to the differences between Java and Ruby?

thanks!

    robert