Project

General

Profile

Bug #1266 ยป pathname.patch

cfis (Charlie Savage), 03/28/2009 05:38 PM

View differences:

lib/pathname.rb (working copy)
# 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:
#
......
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
    (1-1/1)