ruby-changes:53727
From: k0kubun <ko1@a...>
Date: Sat, 24 Nov 2018 09:55:31 +0900 (JST)
Subject: [ruby-changes:53727] k0kubun:r65943 (trunk): Fix r65926 test_dir.rb for windows (tilde)
k0kubun 2018-11-24 09:55:26 +0900 (Sat, 24 Nov 2018) New Revision: 65943 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65943 Log: Fix r65926 test_dir.rb for windows (tilde) [Fix GH-2022] From: MSP-Greg <greg.mpls@g...> Modified files: trunk/test/ruby/test_dir.rb Index: test/ruby/test_dir.rb =================================================================== --- test/ruby/test_dir.rb (revision 65942) +++ test/ruby/test_dir.rb (revision 65943) @@ -377,8 +377,9 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L377 assert_equal(@nodir, Dir.home("")) end if user = ENV["USER"] + tilde = windows? ? "~" : "~#{user}" assert_nothing_raised(ArgumentError) do - assert_equal(File.expand_path("~#{user}"), Dir.home(user)) + assert_equal(File.expand_path(tilde), Dir.home(user)) end end %W[no:such:user \u{7559 5b88}:\u{756a}].each do |user| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/