From: davispuh@... Date: 2016-08-03T16:28:59+00:00 Subject: [ruby-core:76682] [Ruby trunk Bug#12652] For Dir.home encode passed user Issue #12652 has been reported by D��vis Mos��ns. ---------------------------------------- Bug #12652: For Dir.home encode passed user https://bugs.ruby-lang.org/issues/12652 * Author: D��vis Mos��ns * Status: Open * Priority: Normal * Assignee: * 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: