aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/conversions.rb
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-07-13 03:32:38 +0000
committerMarcel Molina <marcel@vernix.org>2006-07-13 03:32:38 +0000
commit2482e17e5794b1728b1208aa1eaf58cef3aa0ab0 (patch)
tree9c142e0c51d3a6af8c662daf832444b8f25a84a9 /activesupport/lib/active_support/core_ext/hash/conversions.rb
parentc80c6364d93bd9caa262cc0d3f9a507d2d2d3af7 (diff)
downloadrails-2482e17e5794b1728b1208aa1eaf58cef3aa0ab0.tar.gz
rails-2482e17e5794b1728b1208aa1eaf58cef3aa0ab0.tar.bz2
rails-2482e17e5794b1728b1208aa1eaf58cef3aa0ab0.zip
Get rid of constant redefinition warnings when running AP tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4610 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index 7927a39d44..b97c6edeb0 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -13,13 +13,13 @@ module ActiveSupport #:nodoc:
::Time => "datetime",
::TrueClass => "boolean",
::FalseClass => "boolean"
- }
+ } unless defined? XML_TYPE_NAMES
XML_FORMATTING = {
"date" => Proc.new { |date| date.to_s(:db) },
"datetime" => Proc.new { |time| time.xmlschema },
"binary" => Proc.new { |binary| Base64.encode64(binary) }
- }
+ } unless defined? XML_FORMATTING
def self.included(klass)
klass.extend(ClassMethods)