Curiouser and curiouser. why does "bar" by itself work here? - it must not be
synonymous with "self.bar" as I thought.

ts wrote:

> ...
>
> pigeon% cat b.rb
> def self.foo
>    p 5
> end
>
> def bar
>    p 12
> end
>
> class Array
>    def toto
>       bar
>       foo
>    end
> end
>
> Array.new.toto
>
> pigeon%
>
> pigeon% ruby b.rb
> 12
> b.rb:12:in `toto': undefined local variable or method `foo' for []:Array (NameError)
>         from b.rb:16
> pigeon%
>
> Guy Decoux