From: matz@... (Yukihiro Matsumoto) Date: 2003-08-06T12:20:04+09:00 Subject: Re: User-defined class coercion? Hi, In message "User-defined class coercion?" on 03/08/06, "Mark J. Reed" writes: |I would like to define my own class that works as a number when |treated as a number but also has other properties. Can I do this? |If so, how? By defining "coerce" method: class Foo def coerce(other) ... return converted_other, self end end matz.