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...
2 parents cbe9180 + 2f8a7ed commit d1230a8cd0ddcf0497ffe294548549c2ab0bef1c @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 d1230a8

Please sign in to comment.