1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Don't autoload constants

This fixes `$ ActionController`
This commit is contained in:
Conrad Irwin 2013-04-07 13:36:17 -07:00
parent bb23c4bb31
commit 7238f0b68d

View file

@ -377,6 +377,7 @@ class Pry
end end
def nested_module?(parent, name) def nested_module?(parent, name)
return if safe_send(parent, :autoload?, name)
child = safe_send(parent, :const_get, name) child = safe_send(parent, :const_get, name)
return unless Module === child return unless Module === child
return unless safe_send(child, :name) == "#{safe_send(parent, :name)}::#{name}" return unless safe_send(child, :name) == "#{safe_send(parent, :name)}::#{name}"