diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/extending.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/extending.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index 8c638f83c2..9abdfc0bc9 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -8,7 +8,7 @@ class Object #:nodoc: def subclasses_of(*superclasses) subclasses = [] ObjectSpace.each_object(Class) do |k| - next if (k.ancestors & superclasses).empty? || superclasses.include?(k) || k.to_s.include?("::") || subclasses.include?(k) + next if (k.ancestors & superclasses).empty? || superclasses.include?(k) || k.to_s.include?("::") || subclasses.include?(k) || !Object.const_defined?(k.to_s.to_sym) subclasses << k end subclasses @@ -42,4 +42,4 @@ class Object #:nodoc: block.bind(self)[*arguments] end end -end
\ No newline at end of file +end |