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:
parent
061add792e
commit
7e1e60b044
2 changed files with 3 additions and 8 deletions
|
@ -139,7 +139,7 @@ class Gem::Security::Policy
|
||||||
raise Gem::Security::Exception,
|
raise Gem::Security::Exception,
|
||||||
"root certificate #{root.subject} is not self-signed " +
|
"root certificate #{root.subject} is not self-signed " +
|
||||||
"(issuer #{root.issuer})" if
|
"(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
|
check_cert root, root, time
|
||||||
end
|
end
|
||||||
|
|
|
@ -844,9 +844,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni
|
||||||
end
|
end
|
||||||
|
|
||||||
if deps
|
if deps
|
||||||
# Since Hash#each is unordered in 1.8, sort the keys and iterate that
|
deps.keys.each do |n|
|
||||||
# way so the tests are deterministic on all implementations.
|
|
||||||
deps.keys.sort.each do |n|
|
|
||||||
spec.add_dependency n, (deps[n] || '>= 0')
|
spec.add_dependency n, (deps[n] || '>= 0')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -873,10 +871,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni
|
||||||
def util_gem(name, version, deps = nil, &block)
|
def util_gem(name, version, deps = nil, &block)
|
||||||
if deps
|
if deps
|
||||||
block = proc do |s|
|
block = proc do |s|
|
||||||
# Since Hash#each is unordered in 1.8, sort
|
deps.keys.each do |n|
|
||||||
# the keys and iterate that way so the tests are
|
|
||||||
# deterministic on all implementations.
|
|
||||||
deps.keys.sort.each do |n|
|
|
||||||
s.add_dependency n, (deps[n] || '>= 0')
|
s.add_dependency n, (deps[n] || '>= 0')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue