diff --git a/lib/boot_merb.rb b/lib/boot_merb.rb index 11120cb..59fe2b2 100644 --- a/lib/boot_merb.rb +++ b/lib/boot_merb.rb @@ -102,4 +102,7 @@ require 'cgi' require File.join(File.dirname(__FILE__), "merb_support", "param_parser.rb") require File.join(File.dirname(__FILE__), "merb_support", "url_encoded_pair_parser.rb") require File.join(File.dirname(__FILE__), "merb_support", "indifferent_access.rb") +require File.join(File.dirname(__FILE__), "merb_support", "support.rb") + + diff --git a/lib/merb_support/indifferent_access.rb b/lib/merb_support/indifferent_access.rb index 2213b09..26e0814 100644 --- a/lib/merb_support/indifferent_access.rb +++ b/lib/merb_support/indifferent_access.rb @@ -1,7 +1,6 @@ # This class has dubious semantics and we only have it so that # people can write params[:key] instead of params['key'] # and they get the same value for both keys. - class HashWithIndifferentAccess < Hash def initialize(constructor = {}) if constructor.is_a?(Hash) @@ -123,16 +122,4 @@ class HashWithIndifferentAccess < Hash end end -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - module IndifferentAccess #:nodoc: - def with_indifferent_access - hash = HashWithIndifferentAccess.new(self) - hash.default = self.default - hash - end - end - end - end -end + diff --git a/lib/webrat.rb b/lib/webrat.rb index 106288b..2419dba 100644 --- a/lib/webrat.rb +++ b/lib/webrat.rb @@ -10,7 +10,6 @@ module Webrat end if defined?(Merb) - puts "************ Booting merb mode" require File.join(File.dirname(__FILE__), "boot_merb.rb") else require File.join(File.dirname(__FILE__), "boot_rails.rb") diff --git a/lib/webrat/form.rb b/lib/webrat/form.rb index 923e5c9..265b20c 100644 --- a/lib/webrat/form.rb +++ b/lib/webrat/form.rb @@ -123,7 +123,7 @@ module Webrat def merge_hash_values(a, b) # :nodoc: a.keys.each do |k| if b.has_key?(k) - case [a[k], b[k]].map(&:class) + case [a[k].class, b[k].class] when [Hash, Hash] a[k] = merge_hash_values(a[k], b[k]) b.delete(k)