Project

General

Profile

Actions

Feature #6263

open

Simple access to toplevel object (main)

Added by trans (Thomas Sawyer) almost 10 years ago. Updated about 4 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:44149]

Description

=begin
Maybe I miss something, but why is there no way to get toplevel object easily. Only way seems
to be:

main = eval('self', TOPLEVEL_BINDING)

Would be nice if there were a simple way, maybe special global (({$main})) would be good choice.
=end

Actions

Also available in: Atom PDF