Permalink
Browse files

Merge pull request #4283 from lest/fix-singleton-checking

use correct variant of checking whether class is a singleton
  • Loading branch information...
1 parent caa6cde commit c4a29de0e0706c7a8e7641f099eedaaf60c185ec @tenderlove tenderlove committed Jan 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/class/attribute.rb
@@ -110,6 +110,6 @@ def #{name}?
private
def singleton_class?
- !name || '' == name
+ ancestors.first != self
end
end

0 comments on commit c4a29de

Please sign in to comment.