« Return to Thread: The simpelest of module function scoping...

Re: The simpelest of module function scoping...

by Matt Neuburg-2 :: Rate this Message:

Reply to Author | View in Thread

Tom <hombre@...> wrote:

> As happens so many times, a few tries later, I figured out that I need
> to do this:
>
> ...
>     def T::t(x)
> ...
>
> And then all works fine.
>
> Which leads to the follow: why was the language designed this way? It
> all seems a bit redundant.

Actually it's extraordinary simple and beautiful. Read my Ruby intro:

http://www.apeth.com/rubyIntro/justenoughruby.html

Read fairly quickly (since you probably know it all, already) just up to
section 1.13 ("The truth? You couldn't handle the truth!"). You will at
that point suddenly understand this syntax and why it is needed. m.

 « Return to Thread: The simpelest of module function scoping...