Hi,

In message "Re: top-level object? top-level methods?"
    on Tue, 25 Jan 2005 12:30:50 +0900, "itsme213" <itsme213 / hotmail.com> writes:

|Is there a top-level object in any executing Ruby program? Is it the thing
|called 'main' in irb?

Yes and yes.

|Is so, why are top-level methods not made singleton-methods on this object,
|instead of being pulled in as instance methods on the Object class itself
|(and hence into all other classes i.e. more namespace pollution than is
|usually intended). This would still allow top-level methods to call other
|top-level methods. And if the top-level object were referred to by some
|constant like Main, then those methods could be called from anywhere with
|Main.method(...).

Do you really wish to type "Main.print" everywhere?

							matz.