Actions
Feature #7412
openPathname#relative_path_from does not support mixed directory separators on windows
    Feature #7412:
    Pathname#relative_path_from does not support mixed directory separators on windows
  
Description
=begin
The support for mixing backslashes and forward slashes in the pathname module in the standard library seems to be broken on windows
require 'pathname'
base = Pathname.new("c:\\")
filepath = Pathname.new("c:/foo/bar/file.ext")
base.relative_path_from(filepath)
raises ArgumentError: different prefix: "c:\\" and "c:/foo/bar/file.ext"
Changing filepath to contain backslashes fixes the problem
filepath = Pathname.new("c:\\foo\\bar\\file.ext")
base.relative_path_from(filepath)
=> #<Pathname:../../..>
=end
        
           Updated by mame (Yusuke Endoh) almost 13 years ago
          Updated by mame (Yusuke Endoh) almost 13 years ago
          
          
        
        
      
      - Status changed from Open to Assigned
- Assignee set to akr (Akira Tanaka)
- Target version set to 2.0.0
        
           Updated by mame (Yusuke Endoh) over 12 years ago
          Updated by mame (Yusuke Endoh) over 12 years ago
          
          
        
        
      
      - Tracker changed from Bug to Feature
Looks a feature request.
--
Yusuke Endoh mame@tsg.ne.jp
        
           Updated by ko1 (Koichi Sasada) over 12 years ago
          Updated by ko1 (Koichi Sasada) over 12 years ago
          
          
        
        
      
      ping -> akr
        
           Updated by ko1 (Koichi Sasada) over 12 years ago
          Updated by ko1 (Koichi Sasada) over 12 years ago
          
          
        
        
      
      - Target version changed from 2.0.0 to 2.1.0
        
           Updated by hsbt (Hiroshi SHIBATA) over 11 years ago
          Updated by hsbt (Hiroshi SHIBATA) over 11 years ago
          
          
        
        
      
      - Target version changed from 2.1.0 to 2.2.0
        
           Updated by naruse (Yui NARUSE) almost 8 years ago
          Updated by naruse (Yui NARUSE) almost 8 years ago
          
          
        
        
      
      - Target version deleted (2.2.0)
Actions