[前][次][番号順一覧][スレッド一覧]

ruby-changes:61766

From: Nobuyoshi <ko1@a...>
Date: Thu, 18 Jun 2020 11:36:50 +0900 (JST)
Subject: [ruby-changes:61766] cf1ee151b1 (master): Read in ASCII-8BIT to get rid of invalid encoding error

https://git.ruby-lang.org/ruby.git/commit/?id=cf1ee151b1

From cf1ee151b1cf7553fd0fce86a39eed4a4133ae46 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 18 Jun 2020 11:29:56 +0900
Subject: Read in ASCII-8BIT to get rid of invalid encoding error


diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index 992850c..ff75f07 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -260,7 +260,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/webrick/test_filehandler.rb#L260
       http = Net::HTTP.new(addr, port)
       if windows?
         root = config[:DocumentRoot].tr("/", "\\")
-        fname = IO.popen(%W[dir /x #{root}\\webrick_long_filename.cgi], &:read)
+        fname = IO.popen(%W[dir /x #{root}\\webrick_long_filename.cgi], encoding: "binary", &:read)
         fname.sub!(/\A.*$^$.*$^$/m, '')
         if fname
           fname = fname[/\s(w.+?cgi)\s/i, 1]
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]