Permalink
Browse files

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
  • Loading branch information...
Marcel Molina
Marcel Molina committed Jul 13, 2006
1 parent c80c636 commit 2482e17e5794b1728b1208aa1eaf58cef3aa0ab0
@@ -815,8 +815,8 @@ def append_to_function_chain!(call)
end
class JavaScriptCollectionProxy < JavaScriptProxy #:nodoc:
- ENUMERABLE_METHODS_WITH_RETURN = [:all, :any, :collect, :map, :detect, :find, :find_all, :select, :max, :min, :partition, :reject, :sort_by]
- ENUMERABLE_METHODS = ENUMERABLE_METHODS_WITH_RETURN + [:each]
+ ENUMERABLE_METHODS_WITH_RETURN = [:all, :any, :collect, :map, :detect, :find, :find_all, :select, :max, :min, :partition, :reject, :sort_by] unless defined? ENUMERABLE_METHODS_WITH_RETURN
+ ENUMERABLE_METHODS = ENUMERABLE_METHODS_WITH_RETURN + [:each] unless defined? ENUMERABLE_METHODS
attr_reader :generator
delegate :arguments_for_call, :to => :generator
@@ -13,13 +13,13 @@ module Conversions
::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)

0 comments on commit 2482e17

Please sign in to comment.