aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/class
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-01-03 23:44:56 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-01-03 23:44:56 +0300
commit2f8a7edadb2bd79580c0ca249b36451c767205a4 (patch)
tree2a671b2ee682822676e731076e791322b20d66e9 /activesupport/lib/active_support/core_ext/class
parentcbe918093b6ad0994cae0fce014c0d987447d9ab (diff)
downloadrails-2f8a7edadb2bd79580c0ca249b36451c767205a4.tar.gz
rails-2f8a7edadb2bd79580c0ca249b36451c767205a4.tar.bz2
rails-2f8a7edadb2bd79580c0ca249b36451c767205a4.zip
use correct variant of checking whether class is a singleton
Diffstat (limited to 'activesupport/lib/active_support/core_ext/class')
-rw-r--r--activesupport/lib/active_support/core_ext/class/attribute.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb
index 45bec264ff..305ed4964b 100644
--- a/activesupport/lib/active_support/core_ext/class/attribute.rb
+++ b/activesupport/lib/active_support/core_ext/class/attribute.rb
@@ -110,6 +110,6 @@ class Class
private
def singleton_class?
- !name || '' == name
+ ancestors.first != self
end
end