From 4790228bc437c6c882bb2171a429979b37f52618 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 4 Feb 2007 19:23:27 +0000 Subject: fix problem with EMPTY_INHERITABLE_ATTRIBUTES being redefined git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_support/core_ext/class/inheritable_attributes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport') 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) -- cgit v1.2.3