Permalink
Browse files

fix problem with EMPTY_INHERITABLE_ATTRIBUTES being redefined

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7a49cb0 commit 4790228bc437c6c882bb2171a429979b37f52618 @technoweenie technoweenie committed Feb 4, 2007
Showing with 2 additions and 1 deletion.
  1. +2 −1 activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -118,7 +118,8 @@ def reset_inheritable_attributes
end
private
- EMPTY_INHERITABLE_ATTRIBUTES = {}.freeze
+ # Prevent this constant from being created multiple times
+ EMPTY_INHERITABLE_ATTRIBUTES = {}.freeze unless const_defined?(:EMPTY_INHERITABLE_ATTRIBUTES)
def inherited_with_inheritable_attributes(child)
inherited_without_inheritable_attributes(child) if respond_to?(:inherited_without_inheritable_attributes)

0 comments on commit 4790228

Please sign in to comment.