From: Eric Hodel Date: 2006-09-01T02:30:05+09:00 Subject: Re: Madness this way lies... On Aug 29, 2006, at 8:23 PM, John Carter wrote: > Ah me. In a fit of over user friendliness I did a couple of the > most colossally stupid things in a class. > > I, with head hung in shame, record them here so that... > * others may avoid them, > * I remember to avoid them later, > * writers of obfusticated ruby may benefit. > > a) Name a method the same as something in the Kernel module and then > forget that you have done so. > > In particular I overrode "puts" in something that didn't inherit > from > IO. OUCH! That really does make printing debugging statements > interesting. Actually, I love to do this for tests, especially when I use open-uri. http://blog.segment7.net/articles/2005/11/20/open-uri-makes-tests-easy -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com