mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Read in ASCII-8BIT to get rid of invalid encoding error
This commit is contained in:
parent
5755397064
commit
cf1ee151b1
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
|
|||
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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue