Project

General

Profile

Actions

Backport #3837

closed

Pathname#relative_path_from raises exception on Windows if path case different

Added by redstun (red stun) over 13 years ago. Updated about 13 years ago.


Description

=begin
I'm using ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32], the following code always raises exception

require 'pathname'

puts RUBY_VERSION
puts RUBY_PLATFORM

p = Pathname.new("c:\")
q = Pathname.new("C:\")
puts q.relative_path_from(p)
puts p.relative_path_from(q)

ruby-1.8.7/lib/ruby/1.8/pathname.rb:726:in `relative_path_from': different prefix: "C:\" and "c:\" (ArgumentError)
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0