Backport #3837
closedPathname#relative_path_from raises exception on Windows if path case different
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
Updated by zenspider (Ryan Davis) over 14 years ago
=begin
On Sep 15, 2010, at 23:29 , red stun wrote:
RubySpec #3837: Pathname#relative_path_from raises exception on Windows if path case different
http://redmine.ruby-lang.org/issues/show/3837Author: red stun
Status: Open, Priority: NormalI'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_PLATFORMp = 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)
I vaguely remember this coming up before. I think it is a dupe.
=end
Updated by redstun (red stun) over 14 years ago
=begin
the bug also affects ruby 1.8.6, but not ruby 1.9.2-p0
=end
Updated by usa (Usaku NAKAMURA) about 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29333.
red, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by usa (Usaku NAKAMURA) about 14 years ago
- Category set to lib
- Status changed from Closed to Assigned
- Assignee set to shyouhei (Shyouhei Urabe)
=begin
=end
Updated by shyouhei (Shyouhei Urabe) about 14 years ago
- Status changed from Assigned to Closed
=begin
This issue was solved with changeset r29884.
red, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end