summaryrefslogtreecommitdiff
path: root/lib/irb/workspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/workspace.rb')
-rw-r--r--lib/irb/workspace.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index 04490ba7c6..d26e43df57 100644
--- a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -75,9 +75,13 @@ EOF
eval("_=nil", @binding)
end
+ # The Binding of this workspace
attr_reader :binding
+ # The top-level workspace of this context, also available as
+ # <code>IRB.conf[:__MAIN__]</code>
attr_reader :main
+ # Evaluate the given +statements+ within the context of this workspace.
def evaluate(context, statements, file = __FILE__, line = __LINE__)
eval(statements, @binding, file, line)
end