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 /lib/rubygems | |
parent | ffd3d83ea8ccf111061a0f03036e5a093bb03674 (diff) |
Merge RubyGems-3.3.14 and Bundler-2.3.14
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/commands/pristine_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/setup_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/specification_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/installer.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/local_remote_options.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/query_utils.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/spec_fetcher.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb index 3cf496ba5b..030c1bffce 100644 --- a/lib/rubygems/commands/pristine_command.rb +++ b/lib/rubygems/commands/pristine_command.rb @@ -113,7 +113,7 @@ extensions will be restored. end.flatten end - specs = specs.select{|spec| RUBY_ENGINE == spec.platform || Gem::Platform.local === spec.platform || spec.platform == Gem::Platform::RUBY } + specs = specs.select {|spec| RUBY_ENGINE == spec.platform || Gem::Platform.local === spec.platform || spec.platform == Gem::Platform::RUBY } if specs.to_a.empty? raise Gem::Exception, diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 7b6890013c..84e9210cfb 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -475,7 +475,7 @@ By default, this RubyGems will install gem as: def files_in(dir) Dir.chdir dir do Dir.glob(File.join('**', '*'), File::FNM_DOTMATCH). - select{|f| !File.directory?(f) } + select {|f| !File.directory?(f) } end end diff --git a/lib/rubygems/commands/specification_command.rb b/lib/rubygems/commands/specification_command.rb index 6f24787962..6fba3a36ec 100644 --- a/lib/rubygems/commands/specification_command.rb +++ b/lib/rubygems/commands/specification_command.rb @@ -129,7 +129,7 @@ Specific fields in the specification can be extracted in YAML format: platform = get_platform_from_requirements(options) if platform - specs = specs.select{|s| s.platform.to_s == platform } + specs = specs.select {|s| s.platform.to_s == platform } end unless options[:all] diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 5c1674f2e8..0613399890 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -725,11 +725,11 @@ class Gem::Installer raise Gem::InstallError, "#{spec} has an invalid name" end - if spec.raw_require_paths.any?{|path| path =~ /\R/ } + if spec.raw_require_paths.any? {|path| path =~ /\R/ } raise Gem::InstallError, "#{spec} has an invalid require_paths" end - if spec.extensions.any?{|ext| ext =~ /\R/ } + if spec.extensions.any? {|ext| ext =~ /\R/ } raise Gem::InstallError, "#{spec} has an invalid extensions" end diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb index 0b8b0ee1a6..9811c8f948 100644 --- a/lib/rubygems/local_remote_options.rb +++ b/lib/rubygems/local_remote_options.rb @@ -26,7 +26,7 @@ module Gem::LocalRemoteOptions valid_uri_schemes = ["http", "https", "file", "s3"] unless valid_uri_schemes.include?(uri.scheme) - msg = "Invalid uri scheme for #{value}\nPreface URLs with one of #{valid_uri_schemes.map{|s| "#{s}://" }}" + msg = "Invalid uri scheme for #{value}\nPreface URLs with one of #{valid_uri_schemes.map {|s| "#{s}://" }}" raise ArgumentError, msg end diff --git a/lib/rubygems/query_utils.rb b/lib/rubygems/query_utils.rb index f4cfea3087..e0c71c43cb 100644 --- a/lib/rubygems/query_utils.rb +++ b/lib/rubygems/query_utils.rb @@ -61,7 +61,7 @@ module Gem::QueryUtils gem_names = if args.empty? [options[:name]] else - options[:exact] ? args.map{|arg| /\A#{Regexp.escape(arg)}\Z/ } : args.map{|arg| /#{arg}/i } + options[:exact] ? args.map {|arg| /\A#{Regexp.escape(arg)}\Z/ } : args.map {|arg| /#{arg}/i } end terminate_interaction(check_installed_gems(gem_names)) if check_installed_gems? diff --git a/lib/rubygems/spec_fetcher.rb b/lib/rubygems/spec_fetcher.rb index 15bfbb6f8d..4033e2efa3 100644 --- a/lib/rubygems/spec_fetcher.rb +++ b/lib/rubygems/spec_fetcher.rb @@ -91,8 +91,8 @@ class Gem::SpecFetcher list.each do |source, specs| if dependency.name.is_a?(String) && specs.respond_to?(:bsearch) - start_index = (0 ... specs.length).bsearch{|i| specs[i].name >= dependency.name } - end_index = (0 ... specs.length).bsearch{|i| specs[i].name > dependency.name } + start_index = (0 ... specs.length).bsearch {|i| specs[i].name >= dependency.name } + end_index = (0 ... specs.length).bsearch {|i| specs[i].name > dependency.name } specs = specs[start_index ... end_index] if start_index && end_index end diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 7e7599f7db..9b533caf54 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1110,7 +1110,7 @@ class Gem::Specification < Gem::BasicSpecification result[spec.name] = spec end - result.map(&:last).flatten.sort_by{|tup| tup.name } + result.map(&:last).flatten.sort_by {|tup| tup.name } end ## |