aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-02-04 19:23:27 +0000
committerRick Olson <technoweenie@gmail.com>2007-02-04 19:23:27 +0000
commit4790228bc437c6c882bb2171a429979b37f52618 (patch)
tree108dbd69ddd69c66a04f0f16b498c9c9cee66f9e /activesupport
parent7a49cb058f5a8345d55f321d6e6bd9dcac22519a (diff)
downloadrails-4790228bc437c6c882bb2171a429979b37f52618.tar.gz
rails-4790228bc437c6c882bb2171a429979b37f52618.tar.bz2
rails-4790228bc437c6c882bb2171a429979b37f52618.zip
fix problem with EMPTY_INHERITABLE_ATTRIBUTES being redefined
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
index b39e316423..2dd0c577d1 100644
--- a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -118,7 +118,8 @@ class Class # :nodoc:
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)