From cf7e472ab412044d97d6ec5263daed456c4f2724 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 17 May 2020 11:58:07 +0900 Subject: [PATCH] [ruby/csv] test scanner: specify encoding explicitly https://github.com/ruby/csv/commit/6e83a1de9c --- lib/csv/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/csv/parser.rb b/lib/csv/parser.rb index 924ca4620d..68fe238194 100644 --- a/lib/csv/parser.rb +++ b/lib/csv/parser.rb @@ -708,7 +708,7 @@ class CSV if SCANNER_TEST class UnoptimizedStringIO def initialize(string) - @io = StringIO.new(string) + @io = StringIO.new(string, "rb:#{string.encoding}") end def gets(*args)