From: Sebastian Hungerecker Date: 2007-12-22T16:59:58+09:00 Subject: Re: Singleton Method Gary Wright wrote: > On Dec 22, 2007, at 1:35 AM, Ryan Lewis wrote: > > So defining the 'second' method like so: > > def Array.second > > self[1] > > end > > > > is the same is making the singleton class like below. > > Class << Array > > def second > > self[1] > > end > > end > > No. Yes, actually. > Your examples are different than mine. They are. They also don't make much sense. But they're still equivalent to each other. > # case 5 > def Array.foo > end > [...] > # still case 5 > class < def foo; end > end See? Both case 5. -- Jabber: sepp2k@jabber.org ICQ: 205544826