From: Eric Mahurin Date: 2005-09-30T23:22:09+09:00 Subject: Re: Operator Overloading << --- Austin Ziegler wrote: > Sorry, but this really doesn't have anything to do with my > statement. > One shouldn't inherit from Array, String, and Hash in Ruby > because there > are certain things that Don't Work the way that you'd expect > them to > because they are written in the C side. In addition to this, I'd also say be very careful about redefining methods in core classes. Same reason - they are written in C. Many times the C code bypasses the standard method call mechanism and calls other C code methods directly so if you redefine you may not get what you want. An extreme example is Regexp#=~. See what happens when you try to override it - you'll get inconsistent results even if only ruby code calls it. __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com