aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/env/shared/to_hash.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-01 21:14:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-01 21:55:51 +0900
commitab516e263c06fbd755d4805ad529c32b1b8292b5 (patch)
treef709104c313268e8443174ab03242fc1e8f6c39c /spec/ruby/core/env/shared/to_hash.rb
parent4e03a7298b3a99de9c57f9a4934d38445cad1b10 (diff)
downloadruby-ab516e263c06fbd755d4805ad529c32b1b8292b5.tar.gz
[ruby/spec] Fix failures with LC_ALL=C
https://github.com/ruby/spec/commit/51047687c0 https://github.com/ruby/spec/commit/2b87b467cc
Diffstat (limited to 'spec/ruby/core/env/shared/to_hash.rb')
-rw-r--r--spec/ruby/core/env/shared/to_hash.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/env/shared/to_hash.rb b/spec/ruby/core/env/shared/to_hash.rb
index bfa5699e8d..a0d4d7ce69 100644
--- a/spec/ruby/core/env/shared/to_hash.rb
+++ b/spec/ruby/core/env/shared/to_hash.rb
@@ -15,11 +15,11 @@ describe :env_to_hash, shared: true do
end
it "uses the locale encoding for keys" do
- ENV.send(@method).keys.all? {|k| k.encoding == Encoding.find('locale') }.should be_true
+ ENV.send(@method).keys.each {|k| k.should.be_locale_env }
end
it "uses the locale encoding for values" do
- ENV.send(@method).values.all? {|v| v.encoding == Encoding.find('locale') }.should be_true
+ ENV.send(@method).values.each {|k| k.should.be_locale_env }
end
it "duplicates the ENV when converting to a Hash" do