Issue #3629 has been updated by Nobuyoshi Nakada.

Status changed from Assigned to Closed


----------------------------------------
Backport #3629: expand_path doesn't expand "~a"
http://redmine.ruby-lang.org/issues/3629

Author: Tomas Matousek
Status: Closed
Priority: Low
Assignee: Yuki Sonoda
Category: 
Target version: 
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]


=begin
 ENV["HOME"] = 'C:/xxx'
 Dir.chdir 'C:/temp' do
   p File.expand_path("a")
   p File.expand_path("~/a")
   p File.expand_path("~a")
 end
 
 Prints:
 
 "C:/temp/a"
 "C:/xxx/a"
 "~a"
 
 I'd expect it to print:
 "C:/temp/a"
 "C:/xxx/a"
 "c:/temp/~a"
 
 "~a" should be considered a regular file name and as such should be prefixed with the current directory path like any other file name.
=end



-- 
http://redmine.ruby-lang.org