Project

General

Profile

Actions

Backport #3837

closed

Pathname#relative_path_from raises exception on Windows if path case different

Added by redstun (red stun) about 14 years ago. Updated over 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 #1

Updated by zenspider (Ryan Davis) about 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/3837

Author: red stun
Status: Open, Priority: Normal

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)

I vaguely remember this coming up before. I think it is a dupe.

=end

Actions #2

Updated by redstun (red stun) about 14 years ago

=begin
the bug also affects ruby 1.8.6, but not ruby 1.9.2-p0
=end

Actions #3

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

Actions #4

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

Actions #5

Updated by shyouhei (Shyouhei Urabe) almost 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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0