Yukihiro Matsumoto wrote:
> How about extending the socket with your module.  See Object#extend.
>    
>   s = ss.accept 
>   s.extend YourSocketExtensionModule
>   ...

Yep, that's the solution I have been using. I just wondered, after seeing
the '<<' syntax, whether there was another way I had missed.

I have also seen "coerce" used in error messages: for example

irb(main):001:0> 0 < Time.now
TypeError: Time can't be coerced into Fixnum

Time does have a 'to_i' method, so is this some other sort of coercion?

Thanks,

Brian.