aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-03 13:10:11 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-03 13:12:02 -0800
commitc4a29de0e0706c7a8e7641f099eedaaf60c185ec (patch)
tree5c627ad99b1ce583f032fe23b9a1de964b8588f4 /activesupport/lib
parentcaa6cdeba11c16d09eb0259150343eb7aff71e3d (diff)
downloadrails-c4a29de0e0706c7a8e7641f099eedaaf60c185ec.tar.gz
rails-c4a29de0e0706c7a8e7641f099eedaaf60c185ec.tar.bz2
rails-c4a29de0e0706c7a8e7641f099eedaaf60c185ec.zip
Merge pull request #4283 from lest/fix-singleton-checking
use correct variant of checking whether class is a singleton
Diffstat (limited to 'activesupport/lib')
-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