From 0d57d59933fb7b826bd0e20d84ed7f6d6636ac90 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 14 Jan 2021 00:14:11 +0900 Subject: Keep encoding in the result of File.expand_path [Bug #17517] --- test/ruby/test_file_exhaustive.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index ac11e0cc85..b966cc690c 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -880,6 +880,8 @@ class TestFileExhaustive < Test::Unit::TestCase assert_equal("#{Dir.pwd}/#{path}", File.expand_path(path)) assert_incompatible_encoding {|d| File.expand_path(d)} + + assert_equal(Encoding::UTF_8, File.expand_path("foo", "#{drive}/").encoding) end def test_expand_path_encoding_filesystem -- cgit v1.2.3