diff options
author | Lars Kanis <[email protected]> | 2020-12-07 17:48:37 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-08 01:48:37 +0900 |
commit | 94b6933d1c6f4c8698319fbcac9dcecc9033b4b9 (patch) | |
tree | 6950fff7edffd487a5fd40b154e8f875bddecd82 /spec | |
parent | 3bf7b999e503199e2e9fe68ade25ee6830b3e57e (diff) |
Set default for Encoding.default_external to UTF-8 on Windows (#2877)
* Use UTF-8 as default for Encoding.default_external on Windows
* Document UTF-8 change on Windows to Encoding.default_external
fix https://bugs.ruby-lang.org/issues/16604
Notes
Notes:
Merged-By: nurse <[email protected]>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/command_line/dash_upper_k_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/library/stringio/binmode_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/command_line/dash_upper_k_spec.rb b/spec/ruby/command_line/dash_upper_k_spec.rb index a060eab793..7e71532295 100644 --- a/spec/ruby/command_line/dash_upper_k_spec.rb +++ b/spec/ruby/command_line/dash_upper_k_spec.rb @@ -58,8 +58,8 @@ describe 'The -K command line option' do end it "ignores unknown codes" do - locale = Encoding.find('locale') + external = Encoding.find('external') ruby_exe(@test_string, options: '-KZ').should == - [Encoding::UTF_8.name, locale.name, nil].inspect + [Encoding::UTF_8.name, external.name, nil].inspect end end diff --git a/spec/ruby/library/stringio/binmode_spec.rb b/spec/ruby/library/stringio/binmode_spec.rb index 83178787f3..853d9c9bd6 100644 --- a/spec/ruby/library/stringio/binmode_spec.rb +++ b/spec/ruby/library/stringio/binmode_spec.rb @@ -9,7 +9,7 @@ describe "StringIO#binmode" do it "changes external encoding to BINARY" do io = StringIO.new - io.external_encoding.should == Encoding.find('locale') + io.external_encoding.should == Encoding.find('external') io.binmode io.external_encoding.should == Encoding::BINARY end |