Permalink
Browse files

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
  • Loading branch information...
1 parent 62efd65 commit c5a70cb500629e21ae57004583b7816f436e167d @vipulnsward vipulnsward committed with rafaelfranca Oct 14, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 activesupport/lib/active_support/core_ext/class/attribute.rb
View
7 activesupport/lib/active_support/core_ext/class/attribute.rb
@@ -119,7 +119,10 @@ def class_attribute(*attrs)
end
private
- def singleton_class?
- ancestors.first != self
+
+ unless respond_to?(:singleton_class?)
+ def singleton_class?
+ ancestors.first != self
+ end
end
end

0 comments on commit c5a70cb

Please sign in to comment.