mirror of https://github.com/rails/rails
Merge pull request #4283 from lest/fix-singleton-checking
use correct variant of checking whether class is a singleton
This commit is contained in:
commit
d1230a8cd0
|
@ -110,6 +110,6 @@ class Class
|
|||
|
||||
private
|
||||
def singleton_class?
|
||||
!name || '' == name
|
||||
ancestors.first != self
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue