Skip to content

Commit 9e7e68b

Browse files
authored
Merge pull request #202 from ruby/claude/sharp-spence-bb5014
Read as UTF-8 in test_gets_limit_multibyte_boundary
2 parents be8611d + 774e470 commit 9e7e68b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/zlib/test_zlib.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ def test_gets_limit_multibyte_boundary
17901790
# whole characters (same as IO#gets(limit)).
17911791
content = (("\u3042\u3044\u3046" * 700) + "\n") * 3
17921792
[1, 4, 7, 10].each do |limit|
1793-
r = Zlib::GzipReader.new(StringIO.new(Zlib.gzip(content, level: 0)))
1793+
r = Zlib::GzipReader.new(StringIO.new(Zlib.gzip(content, level: 0)), external_encoding: Encoding::UTF_8)
17941794
lines = []
17951795
while (line = r.gets(limit))
17961796
lines << line

0 commit comments

Comments
 (0)