aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_request_set_lockfile_parser.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-01 12:43:26 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-01 12:43:26 +0000
commita21d403f21473b21b5766c2483b4325240e9edda (patch)
treebd10197f9589251f35f0f9dc6fa387f0e298a6ef /test/rubygems/test_gem_request_set_lockfile_parser.rb
parent94cfa2893ccab71341d4671201253339d56d6c97 (diff)
downloadruby-a21d403f21473b21b5766c2483b4325240e9edda.tar.gz
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
It supports to enable frozen string literal and add `--norc` option for disable to `.gemrc` configuration. See 2.5.2 release notes for other fixes and enhancements. https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_request_set_lockfile_parser.rb')
-rw-r--r--test/rubygems/test_gem_request_set_lockfile_parser.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_request_set_lockfile_parser.rb b/test/rubygems/test_gem_request_set_lockfile_parser.rb
index afb92e2840..9946c522d9 100644
--- a/test/rubygems/test_gem_request_set_lockfile_parser.rb
+++ b/test/rubygems/test_gem_request_set_lockfile_parser.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'rubygems/test_case'
require 'rubygems/request_set'
require 'rubygems/request_set/lockfile'
@@ -246,10 +246,15 @@ DEPENDENCIES
assert lockfile_set, 'found a LockSet'
- assert_equal %w[a-2 a-2], lockfile_set.specs.map { |s| s.full_name }
+ assert_equal %w[a-2], lockfile_set.specs.map { |s| s.full_name }
- assert_equal %w[https://gems.example/ https://other.example/],
- lockfile_set.specs.map { |s| s.source.uri.to_s }
+ if [].respond_to? :flat_map
+ assert_equal %w[https://gems.example/ https://other.example/],
+ lockfile_set.specs.flat_map { |s| s.sources.map{ |src| src.uri.to_s } }
+ else # FIXME: remove when 1.8 is dropped
+ assert_equal %w[https://gems.example/ https://other.example/],
+ lockfile_set.specs.map { |s| s.sources.map{ |src| src.uri.to_s } }.flatten(1)
+ end
end
def test_parse_GIT