aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb4
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index 4c593a40f2..531ff0b2ed 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -815,8 +815,8 @@ module ActionView
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
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)