summaryrefslogtreecommitdiff
path: root/test/webrick/test_filehandler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/webrick/test_filehandler.rb')
-rw-r--r--test/webrick/test_filehandler.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index 758ec7f589..d6fa4e2f15 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -291,6 +291,11 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
def test_cjk_in_path
Dir.mktmpdir("\u3042") do |dir|
File.write("#{dir}/\u3042.txt", "test_cjk_in_path")
+ begin
+ dir = dir.encode('filesystem')
+ rescue EncodingError
+ dir = dir.b
+ end
config = { :DocumentRoot => dir }
TestWEBrick.start_httpserver(config) do |server, addr, port, log|
http = Net::HTTP.new(addr, port)