Sebastian Hungerecker
7/31/2008 8:23:00 PM
John Winters wrote:
> Why when Able is a sub-class of Array does my to_s method get ignored?
Because puts special cases arrays, not calling to_s on them at all.
If you compare puts [1,2,3] to puts [1,2,3].to_s you will see
that this is the case (puts [1,2,3] is just like puts 1,2,3 printing
each number on its own line instead of having it all in one line like
you get with to_s.
HTH,
Sebastian
--
NP: Dimmu Borgir - Sorgens Kammer - Del II (Bonus Track)
Jabber: sepp2k@jabber.org
ICQ: 205544826