Permalink
Browse files

module constants should be looked up at top-level by default

  • Loading branch information...
1 parent dc0e15c commit 77387b3e5cf9c8eb057eb0e7d8a3e74fa784fd53 @banister banister committed Apr 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pry/wrapped_module.rb
@@ -25,8 +25,8 @@ class WrappedModule
# @return [Module, nil] The module or `nil` (if conversion failed).
# @example
# Pry::WrappedModule.from_str("Pry::Code")
- def self.from_str(mod_name)
- Pry::WrappedModule.new(eval(mod_name))
+ def self.from_str(mod_name, binding=TOPLEVEL_BINDING)
+ Pry::WrappedModule.new(binding.eval(mod_name))
rescue RescuableException
nil
end

0 comments on commit 77387b3

Please sign in to comment.