Dir.home with valid named user raises ArgumentError on Windows
C:\>C:\Ruby\ruby-2.2.4-x64-mingw32\bin\ruby.exe -ve "p Dir.home; p Dir.home('Administrator')" ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32] "C:/Users/Administrator" -e:1:in `home': user Administrator doesn't exist (ArgumentError) from -e:1:in `<main>'
Updated by nobu (Nobuyoshi Nakada) almost 4 years ago
- Status changed from Open to Closed
Applied in changeset r54947.
file.c: home dir fall back
- file.c (rb_home_dir_of): return the default home path if the user name is the current user name, on platforms where struct pwd is not supported. a temporary measure against [Bug #12226].