Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

try not including inherited constants to preloading

  • Loading branch information...
commit e0f94df6741700008e2a57a2bcafb4bae2cedafb 1 parent f78d916
@svenfuchs svenfuchs authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/core_ext/module/load_constants.rb
View
4 lib/core_ext/module/load_constants.rb
@@ -11,7 +11,7 @@ def initialize(options)
end
def load_constants(const)
- const.constants.each do |name|
+ const.constants(false).each do |name|
full_name = [const.name, name].join('::')
unless skip?(full_name)
skip_names << full_name
@@ -19,7 +19,7 @@ def load_constants(const)
child = begin
const.const_get(name)
rescue NameError => e
- eval("#{const}::#{name}")
+ eval(full_name)
end
load_constants(child) if loadable?(child)
end
Please sign in to comment.
Something went wrong with that request. Please try again.