summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2020-03-12 13:55:20 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-15 18:43:01 +0900
commite257c08f2ec27e2d66cdfa7e2415deb492522e22 (patch)
tree81fd971c2851d40248d0f1229661eda210b2c36e /spec
parentd79890cbfaa32444e3bab60835d7f09abf3d9469 (diff)
downloadruby-e257c08f2ec27e2d66cdfa7e2415deb492522e22.tar.gz
[ruby/stringio] StringIO#initialize default to the source string encoding
[Bug #16497] https://github.com/ruby/stringio/commit/4958a5ccab
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/library/stringio/initialize_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/initialize_spec.rb b/spec/ruby/library/stringio/initialize_spec.rb
index cc4f4c9254..8aae47dacb 100644
--- a/spec/ruby/library/stringio/initialize_spec.rb
+++ b/spec/ruby/library/stringio/initialize_spec.rb
@@ -187,11 +187,14 @@ end
describe "StringIO#initialize sets the encoding to" do
before :each do
@external = Encoding.default_external
+ @internal = Encoding.default_internal
Encoding.default_external = Encoding::ISO_8859_2
+ Encoding.default_internal = Encoding::ISO_8859_2
end
after :each do
Encoding.default_external = @external
+ Encoding.default_internal = @internal
end
it "Encoding.default_external when passed no arguments" do