Project

General

Profile

This project is closed and read-only.

Actions

Backport #3837

closed

Pathname#relative_path_from raises exception on Windows if path case different

Backport #3837: Pathname#relative_path_from raises exception on Windows if path case different

Added by redstun (red stun) about 16 years ago. Updated over 15 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: PDF Atom