add changelog & docs for Pry.main

This commit is contained in:
Robert Gleeson 2014-03-16 10:22:34 +01:00
parent b13029d21d
commit 88b064c96a
2 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,7 @@
* lazy load `Pry::InputCompleter` or `Pry::BondCompleter`.
- `Pry::BondCompleter` is loaded when the "bond" gem is available and editline is not being used(OSX)
* add option to disable input completer through `_pry_.config.completer = nil`
* add `Pry.main`. returns a special instance of Object referenced by self of `TOPLEVEL_BINDING`: "main".
* add `Pry::LastException` (#1145)
#### Bug fixes, etc.

View File

@ -34,6 +34,10 @@ class Pry
end
end
#
# @return [main]
# returns the special instance of Object, "main".
#
def self.main
@main ||= TOPLEVEL_BINDING.eval "self"
end