diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-03-26 18:42:48 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-03-30 12:49:24 +0900 |
commit | 7e1e60b0445bc2329e60642e2cc2c14c1668352a (patch) | |
tree | 2b962ffa608b6be1340eac266fd453861bbd252a /lib | |
parent | 061add792e658878c839887682716737d9f6d677 (diff) |
[rubygems/rubygems] Remove ruby 1.8 leftovers
https://github.com/rubygems/rubygems/commit/84c89275b8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/security/policy.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/test_case.rb | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/rubygems/security/policy.rb b/lib/rubygems/security/policy.rb index 1aa6eab18c..90e40b8289 100644 --- a/lib/rubygems/security/policy.rb +++ b/lib/rubygems/security/policy.rb @@ -139,7 +139,7 @@ class Gem::Security::Policy raise Gem::Security::Exception, "root certificate #{root.subject} is not self-signed " + "(issuer #{root.issuer})" if - root.issuer.to_s != root.subject.to_s # HACK to_s is for ruby 1.8 + root.issuer != root.subject check_cert root, root, time end diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index ba9b6435f4..3c00a491c1 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -844,9 +844,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni end if deps - # Since Hash#each is unordered in 1.8, sort the keys and iterate that - # way so the tests are deterministic on all implementations. - deps.keys.sort.each do |n| + deps.keys.each do |n| spec.add_dependency n, (deps[n] || '>= 0') end end @@ -873,10 +871,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni def util_gem(name, version, deps = nil, &block) if deps block = proc do |s| - # Since Hash#each is unordered in 1.8, sort - # the keys and iterate that way so the tests are - # deterministic on all implementations. - deps.keys.sort.each do |n| + deps.keys.each do |n| s.add_dependency n, (deps[n] || '>= 0') end end |