Project

General

Profile

Bug #10858

Updated by nobu (Nobuyoshi Nakada) about 9 years ago

On Windows, if the first argument to File.expand_path is a drive-current path, and the dir argument is relative, you get a bogus result: 

 ~~~ruby 
 irb(main):001:0> File.expand_path("c:foo", "bar") 
 => "C:/Users/djberge/Repositories/bar/c:foo" 
 ~~~ 

 Compare that with Ruby 1.8: 

 ~~~ruby 
 irb(main):002:0> RUBY_VERSION 
 => "1.8.7" 
 irb(main):003:0> File.expand_path('c:foo', "bar") 
 => "C:/Users/djberge/Repositories/bar/foo" 
 ~~~

Back