From: matz@... (Yukihiro Matsumoto) Date: 2001-05-16T16:09:49+09:00 Subject: [ruby-talk:15249] Re: class << self Hi, In message "[ruby-talk:15248] Re: class << self" on 01/05/16, Hans-Dieter Stich writes: |> > Class A |> > class << self |> > def method1 |> > end |> > end |> > end |> > |> > and |> > |> > Class A |> > def A.method1 |> > end |> > end |> > |> > ??? |> > |> > ciao |> > h-d |> |> These two forms are equivalent and define the same singleton method A.method1. | |ok, i agree to you, but are their any advantages or |disadvantages for using the one or other form? The former is full form, you can do everything, define, undefine, alias, etc. The latter is simple form. It's easier and appearance is similar to invocation form. matz.