Index: lib/pathname.rb =================================================================== --- lib/pathname.rb (revision 23091) +++ lib/pathname.rb (working copy) @@ -197,6 +197,12 @@ # to_path is implemented so Pathname objects are usable with File.open, etc. TO_PATH = :to_path end + + if RUBY_PLATFORM =~ /mswin|mingw/ + COMPARISON = :casecmp + else + COMPARISON = :eql? + end # :startdoc: # @@ -786,12 +792,12 @@ base_prefix, basename = r base_names.unshift basename if basename != '.' end - if dest_prefix != base_prefix + if not (dest_prefix.send(COMPARISON, base_prefix)) raise ArgumentError, "different prefix: #{dest_prefix.inspect} and #{base_directory.inspect}" end while !dest_names.empty? && !base_names.empty? && - dest_names.first == base_names.first + dest_names.first.send(COMPARISON, base_names.first) dest_names.shift base_names.shift end