Skip to content
Browse files

fix problem with EMPTY_INHERITABLE_ATTRIBUTES being redefined

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 21fafdd commit 92b00efd7001e6a3fecd6f7d7bddc1f6d43ab54e @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
View
3 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 92b00ef

Please sign in to comment.
Something went wrong with that request. Please try again.