From: Harry Ohlsen Date: 2001-12-11T01:39:47+09:00 Subject: [ruby-talk:28100] Re: How does puts decide how to print a given object? In article <200112101600.fBAG0Gn09633@moulon.inra.fr>, "ts" wrote: >>>>>> "H" == Harry Ohlsen writes: > > H> alias old_puts puts > > Apparently you like alias and self :-) Not really. Just don't know any better! > > Try this > > > def puts(x) > if x.type == Array > x.puts > else > super > end > end So, does that mean that when we redefine a "global" method, calling super automatically calls the one that existed before we defined it? I didn't expect this, because I wasn't defining a new class. Or have I completely misunderstood ... not an unknown occurrence !!