From: "luislavena (Luis Lavena)" Date: 2013-03-11T01:02:50+09:00 Subject: [ruby-core:53289] [ruby-trunk - Bug #8034] File.expand_path('something', '~') do not include home path Issue #8034 has been updated by luislavena (Luis Lavena). =begin nobu (Nobuyoshi Nakada) wrote: > =begin > Why is (({File.expand_path('something', '~whoever')})) ignored? There is no test for that, I didn't see a test that verifies that behavior so I didn't add code for it. Also, (({~user})) doesn't work as you expect on Windows. > =end =end ---------------------------------------- Bug #8034: File.expand_path('something', '~') do not include home path https://bugs.ruby-lang.org/issues/8034#change-37465 Author: rap-kasta (Pavel Manylov) Status: Closed Priority: Normal Assignee: luislavena (Luis Lavena) Category: platform/windows Target version: ruby -v: 1.9.3p362 =begin Next code works correctly only on ruby <= 1.9.3p362. Tested on Windows XP, Windows 2008 with ruby 1.9.3p194 (works properly), ruby 1.9.3p362 (bug), ruby 2.0.0p0 (bug). (({File.expand_path('something', '~') #=> "C:/path/to/current/dir/~/something"})) However, next code works as it should in all tested rubies: (({File.expand_path '~' # => "C:/Documents and Settings/Jack" Dir.home # => "C:/Documents and Settings/Jack"})) =end -- http://bugs.ruby-lang.org/