diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-07-13 14:36:57 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2022-09-03 15:54:07 +0900 |
commit | d7862a5de43f7412ab41cdae6709c8a30b988621 (patch) | |
tree | 9380b0239b29f05fbdc1b0aff66caae066b5e71f /test | |
parent | ffd3d83ea8ccf111061a0f03036e5a093bb03674 (diff) |
Merge RubyGems-3.3.14 and Bundler-2.3.14
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/helper.rb | 2 | ||||
-rw-r--r-- | test/rubygems/package/tar_test_case.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_contents_command.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_gem_request_set_lockfile_parser.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_resolver_installer_set.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 12 | ||||
-rw-r--r-- | test/rubygems/test_require.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_rubygems.rb | 2 |
10 files changed, 17 insertions, 17 deletions
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index 4460df8319..a0b2c98505 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -1294,7 +1294,7 @@ Also, a list: end def rubygems_path - $LOAD_PATH.find{|p| p == File.dirname($LOADED_FEATURES.find{|f| f.end_with?("/rubygems.rb") }) } + $LOAD_PATH.find {|p| p == File.dirname($LOADED_FEATURES.find {|f| f.end_with?("/rubygems.rb") }) } end def with_clean_path_to_ruby diff --git a/test/rubygems/package/tar_test_case.rb b/test/rubygems/package/tar_test_case.rb index 99f503a23f..4517f40730 100644 --- a/test/rubygems/package/tar_test_case.rb +++ b/test/rubygems/package/tar_test_case.rb @@ -67,7 +67,7 @@ class Gem::Package::TarTestCase < Gem::TestCase end def calc_checksum(header) - sum = header.unpack("C*").inject{|s,a| s + a } + sum = header.unpack("C*").inject {|s,a| s + a } SP(Z(to_oct(sum, 6))) end diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0ff8b4a1db..53fb058e99 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -1061,7 +1061,7 @@ class TestGem < Gem::TestCase Gem.refresh - Gem::Specification.each{|spec| assert spec.activated? if spec == s } + Gem::Specification.each {|spec| assert spec.activated? if spec == s } Gem.loaded_specs.delete(s) Gem.refresh diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb index d79174717b..cf93d81e7e 100644 --- a/test/rubygems/test_gem_commands_contents_command.rb +++ b/test/rubygems/test_gem_commands_contents_command.rb @@ -239,7 +239,7 @@ lib/foo.rb [RbConfig::CONFIG['bindir'], 'default_command'], [RbConfig::CONFIG['rubylibdir'], 'default/gem.rb'], [RbConfig::CONFIG['archdir'], 'default_gem.so'], - ].sort.map{|a|File.join a }.join "\n" + ].sort.map {|a|File.join a }.join "\n" assert_equal expected, @ui.output.chomp assert_equal "", @ui.error diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb index 47a97dae4b..6127fcc124 100644 --- a/test/rubygems/test_gem_commands_install_command.rb +++ b/test/rubygems/test_gem_commands_install_command.rb @@ -521,7 +521,7 @@ ERROR: Possible alternatives: non_existent_with_hint end def test_execute_required_ruby_version - next_ruby = Gem.ruby_version.segments.map.with_index{|n, i| i == 1 ? n + 1 : n }.join(".") + next_ruby = Gem.ruby_version.segments.map.with_index {|n, i| i == 1 ? n + 1 : n }.join(".") local = Gem::Platform.local spec_fetcher do |fetcher| @@ -610,7 +610,7 @@ ERROR: Possible alternatives: non_existent_with_hint end def test_execute_required_ruby_version_specific_prerelease_not_met - next_ruby_pre = Gem.ruby_version.segments.map.with_index{|n, i| i == 1 ? n + 1 : n }.join(".") + ".a" + next_ruby_pre = Gem.ruby_version.segments.map.with_index {|n, i| i == 1 ? n + 1 : n }.join(".") + ".a" spec_fetcher do |fetcher| fetcher.gem 'a', '1.0' do |s| diff --git a/test/rubygems/test_gem_request_set_lockfile_parser.rb b/test/rubygems/test_gem_request_set_lockfile_parser.rb index 4007c3a69c..775085964e 100644 --- a/test/rubygems/test_gem_request_set_lockfile_parser.rb +++ b/test/rubygems/test_gem_request_set_lockfile_parser.rb @@ -248,7 +248,7 @@ DEPENDENCIES 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.flat_map {|s| s.sources.map{|src| src.uri.to_s } } + lockfile_set.specs.flat_map {|s| s.sources.map {|src| src.uri.to_s } } end def test_parse_GIT diff --git a/test/rubygems/test_gem_resolver_installer_set.rb b/test/rubygems/test_gem_resolver_installer_set.rb index 928a16b9d3..7a6d17f2b0 100644 --- a/test/rubygems/test_gem_resolver_installer_set.rb +++ b/test/rubygems/test_gem_resolver_installer_set.rb @@ -210,7 +210,7 @@ class TestGemResolverInstallerSet < Gem::TestCase def (set.remote_set).prefetch(_) raise "called" end - assert_raise(RuntimeError){ set.prefetch(nil) } + assert_raise(RuntimeError) { set.prefetch(nil) } set = Gem::Resolver::InstallerSet.new :local def (set.remote_set).prefetch(_) diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 55dd7f0ff2..8b0477c4dd 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -992,8 +992,8 @@ dependencies: [] dir_standard_specs = File.join Gem.dir, 'specifications' - save_gemspec('a-1', '1', dir_standard_specs){|s| s.name = 'a' } - save_gemspec('b-1', '1', dir_standard_specs){|s| s.name = 'b' } + save_gemspec('a-1', '1', dir_standard_specs) {|s| s.name = 'a' } + save_gemspec('b-1', '1', dir_standard_specs) {|s| s.name = 'b' } assert_equal ['a-1'], Gem::Specification.stubs_for('a').map {|s| s.full_name } assert_equal 1, Gem::Specification.class_variable_get(:@@stubs_by_name).length @@ -1013,7 +1013,7 @@ dependencies: [] def test_self_stubs_for_no_lazy_loading_after_all_specs_setup Gem::Specification.all = [util_spec('a', '1')] - save_gemspec('b-1', '1', File.join(Gem.dir, 'specifications')){|s| s.name = 'b' } + save_gemspec('b-1', '1', File.join(Gem.dir, 'specifications')) {|s| s.name = 'b' } assert_equal [], Gem::Specification.stubs_for('b').map {|s| s.full_name } end @@ -1060,9 +1060,9 @@ dependencies: [] def test_self_stubs_returns_only_specified_named_specs dir_standard_specs = File.join Gem.dir, 'specifications' - save_gemspec('a-1', '1', dir_standard_specs){|s| s.name = 'a' } - save_gemspec('a-2', '2', dir_standard_specs){|s| s.name = 'a' } - save_gemspec('a-a', '3', dir_standard_specs){|s| s.name = 'a-a' } + save_gemspec('a-1', '1', dir_standard_specs) {|s| s.name = 'a' } + save_gemspec('a-2', '2', dir_standard_specs) {|s| s.name = 'a' } + save_gemspec('a-a', '3', dir_standard_specs) {|s| s.name = 'a-a' } assert_equal ['a-1', 'a-2'], Gem::Specification.stubs_for('a').map(&:full_name).sort end diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb index 8857ceef25..9aa057442a 100644 --- a/test/rubygems/test_require.rb +++ b/test/rubygems/test_require.rb @@ -152,8 +152,8 @@ class TestGemRequire < Gem::TestCase install_specs a1, b1 - t1 = create_sync_thread{ assert_require "a#{$$}" } - t2 = create_sync_thread{ assert_require "b#{$$}" } + t1 = create_sync_thread { assert_require "a#{$$}" } + t2 = create_sync_thread { assert_require "b#{$$}" } # wait until both files are waiting on the exit latch FILE_ENTERED_LATCH.await diff --git a/test/rubygems/test_rubygems.rb b/test/rubygems/test_rubygems.rb index 26c5f1e0fd..cc650ff343 100644 --- a/test/rubygems/test_rubygems.rb +++ b/test/rubygems/test_rubygems.rb @@ -66,6 +66,6 @@ class GemTest < Gem::TestCase end def ruby_with_rubygems_and_fake_operating_system_in_load_path(operating_system_path) - [Gem.ruby, "-I", operating_system_path, "-I" , $LOAD_PATH.find{|p| p == File.dirname($LOADED_FEATURES.find{|f| f.end_with?("/rubygems.rb") }) }] + [Gem.ruby, "-I", operating_system_path, "-I" , $LOAD_PATH.find {|p| p == File.dirname($LOADED_FEATURES.find {|f| f.end_with?("/rubygems.rb") }) }] end end |