1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Remove ruby 1.8 leftovers

https://github.com/rubygems/rubygems/commit/84c89275b8
This commit is contained in:
David Rodríguez 2020-03-26 18:42:48 +01:00 committed by Hiroshi SHIBATA
parent 061add792e
commit 7e1e60b044
2 changed files with 3 additions and 8 deletions

View file

@ -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

View file

@ -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