On Oct 22, 5:51 am, John Mair <jrm... / gmail.com> wrote:
> Why is it that top-level isn't just the Object class itself? what's the
> rationale behind the 'main' object?

It should not be. In fact, I think it is a mistake for main to
delegate to Object at all. It becomes a headache when trying to write
a scripting DSL. Rather than run the script at toplevel --which is
very nice b/c of the way #require works, one has to run the script in
a evaluation context so as to prevent pollution of every object. It is
easy enough to extend the Object class by opening it up or opening the
Kernel module, so this delegation is little more than a "nicety" --but
not a very nice one really.

Ideally main would simply be:

  module Main
    extend self
  end