diff options
author | Vipul A M <vipulnsward@gmail.com> | 2013-10-14 22:40:21 +0530 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2015-01-02 21:18:35 -0800 |
commit | 2f558088acb2ab65ed4dcd87a8ef42d1b26a8035 (patch) | |
tree | 6c2882f5783f78159dd0f978f89ea539830a6915 /activesupport/lib/active_support/core_ext/class | |
parent | d22e2383fe7dc963af128130336264ba2dfccbeb (diff) | |
download | rails-2f558088acb2ab65ed4dcd87a8ef42d1b26a8035.tar.gz rails-2f558088acb2ab65ed4dcd87a8ef42d1b26a8035.tar.bz2 rails-2f558088acb2ab65ed4dcd87a8ef42d1b26a8035.zip |
Fix `singleton_class?`
Due to changes from http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39628 current `singleton_class?` implementation fails.
Changed based on reference from http://bugs.ruby-lang.org/issues/7609
Conflicts:
activesupport/lib/active_support/core_ext/class/attribute.rb
Diffstat (limited to 'activesupport/lib/active_support/core_ext/class')
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/attribute.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index cd7877fce4..14adc426d8 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -109,7 +109,9 @@ class Class end private - def singleton_class? - ancestors.first != self - end + unless respond_to?(:singleton_class?) + def singleton_class? + ancestors.first != self + end + end end |