ruby-changes:62326
From: Nobuyoshi <ko1@a...>
Date: Mon, 20 Jul 2020 14:59:41 +0900 (JST)
Subject: [ruby-changes:62326] c62aff1632 (master): [ruby/stringio] Added non-ASCII but convertible encoding case
https://git.ruby-lang.org/ruby.git/commit/?id=c62aff1632 From c62aff16325c6b170f437f7ebe97c09387464ada Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 19 Jul 2020 11:38:58 +0900 Subject: [ruby/stringio] Added non-ASCII but convertible encoding case https://github.com/ruby/stringio/commit/1d28e5c969 diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index 3cf7f42..ab448f0 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -195,6 +195,9 @@ class TestStringIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/stringio/test_stringio.rb#L195 s = StringIO.new.set_encoding(conversion_encoding) s.write(convertible) assert_equal(conversion_encoding, s.string.encoding) + s = StringIO.new.set_encoding(Encoding::UTF_8) + s.write("foo".force_encoding("ISO-8859-1"), convertible) + assert_equal(Encoding::UTF_8, s.string.encoding) all_assertions do |a| [ inconvertible, -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/