For Dir.home encode passed user
Currently Dir.home(user) expects that passed user will be already in appropriate encoding but if it's not it will fail because comparing with different encodings.
This causes TestDir#test_home to fail.
user = ENV['USER'] puts Dir.home(user)
`home': user Dāvis doesn't exist (ArgumentError)
On Linux it will fail too if passed user is in different encoding than locale.
I've attached a patch which fixes this.
- file.c (rb_home_dir_of): convert given username into filesystem encoding. [ruby-core:76682] [Bug #12652] patched by Dāvis Mosāns
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e