--f46d044518232020b204b499d28c
Content-Type: text/plain; charset=UTF-8

On Wed, Dec 21, 2011 at 11:57, Hans Mackowiak <hanmac / gmx.de> wrote:

> <<self is very bad because it starts an multiline string
>
> allways do << self with an " "
>

Huh?

`class "Foo"` isn't valid syntax for a class definition, so the presence of
"class" disambiguates it.

class X
  class <<self
    def foo
      :foo
    end
  end

  class << self
    def bar
      :bar
    end
  end
end

X.foo #:foo
X.bar #:bar

(But in this case, I think `def self.foo` is better.)

--f46d044518232020b204b499d28c--