From: shyouhei@... Date: 2016-10-11T07:03:43+00:00 Subject: [ruby-core:77553] [Ruby trunk Bug#12652][Assigned] For Dir.home encode passed user Issue #12652 has been updated by Shyouhei Urabe. Status changed from Open to Assigned Assignee set to Yui NARUSE ---------------------------------------- Bug #12652: For Dir.home encode passed user https://bugs.ruby-lang.org/issues/12652#change-60819 * Author: D��vis Mos��ns * Status: Assigned * Priority: Normal * Assignee: Yui NARUSE * ruby -v: ruby 2.4.0dev (2016-08-03 trunk 55810) [x64-mswin64_140] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- 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. ~~~ruby user = ENV['USER'] puts Dir.home(user) ~~~ fails with ~~~ `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. ---Files-------------------------------- 0001-For-Dir.home-encode-passed-user.patch (1.24 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: