ruby-changes:54869
From: hsbt <ko1@a...>
Date: Thu, 14 Feb 2019 21:59:18 +0900 (JST)
Subject: [ruby-changes:54869] hsbt:r67074 (trunk): Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
hsbt 2019-02-14 21:59:03 +0900 (Thu, 14 Feb 2019) New Revision: 67074 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67074 Log: Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c This version contains the some style changes by RuboCop. * https://github.com/rubygems/rubygems/commit/9d810be0ede925fb2e3af535848582c3f8e0e72f * https://github.com/rubygems/rubygems/commit/61ea98a727fb1b76b6fac52d74107ee4b02aaef2 * https://github.com/rubygems/rubygems/commit/795893dce3c5f8540804fc08144cc6a90f086b13 * https://github.com/rubygems/rubygems/commit/9be7858f7f17eae3058204f3c03e4b798ba18b9c Modified files: trunk/lib/rubygems/available_set.rb trunk/lib/rubygems/basic_specification.rb trunk/lib/rubygems/command.rb trunk/lib/rubygems/commands/build_command.rb trunk/lib/rubygems/commands/cleanup_command.rb trunk/lib/rubygems/commands/contents_command.rb trunk/lib/rubygems/commands/dependency_command.rb trunk/lib/rubygems/commands/info_command.rb trunk/lib/rubygems/commands/install_command.rb trunk/lib/rubygems/commands/lock_command.rb trunk/lib/rubygems/commands/mirror_command.rb trunk/lib/rubygems/commands/open_command.rb trunk/lib/rubygems/commands/outdated_command.rb trunk/lib/rubygems/commands/owner_command.rb trunk/lib/rubygems/commands/pristine_command.rb trunk/lib/rubygems/commands/push_command.rb trunk/lib/rubygems/commands/query_command.rb trunk/lib/rubygems/commands/rdoc_command.rb trunk/lib/rubygems/commands/setup_command.rb trunk/lib/rubygems/commands/signin_command.rb trunk/lib/rubygems/commands/specification_command.rb trunk/lib/rubygems/commands/stale_command.rb trunk/lib/rubygems/commands/uninstall_command.rb trunk/lib/rubygems/commands/update_command.rb trunk/lib/rubygems/commands/which_command.rb trunk/lib/rubygems/commands/yank_command.rb trunk/lib/rubygems/config_file.rb trunk/lib/rubygems/core_ext/kernel_gem.rb trunk/lib/rubygems/defaults.rb trunk/lib/rubygems/dependency.rb trunk/lib/rubygems/dependency_installer.rb trunk/lib/rubygems/dependency_list.rb trunk/lib/rubygems/deprecate.rb trunk/lib/rubygems/errors.rb trunk/lib/rubygems/exceptions.rb trunk/lib/rubygems/ext/builder.rb trunk/lib/rubygems/ext/cmake_builder.rb trunk/lib/rubygems/ext/ext_conf_builder.rb trunk/lib/rubygems/gemcutter_utilities.rb trunk/lib/rubygems/indexer.rb trunk/lib/rubygems/installer.rb trunk/lib/rubygems/installer_test_case.rb trunk/lib/rubygems/local_remote_options.rb trunk/lib/rubygems/mock_gem_ui.rb trunk/lib/rubygems/name_tuple.rb trunk/lib/rubygems/package.rb trunk/lib/rubygems/path_support.rb trunk/lib/rubygems/platform.rb trunk/lib/rubygems/psych_tree.rb trunk/lib/rubygems/remote_fetcher.rb trunk/lib/rubygems/request/connection_pools.rb trunk/lib/rubygems/request/http_pool.rb trunk/lib/rubygems/request/https_pool.rb trunk/lib/rubygems/request.rb trunk/lib/rubygems/request_set/gem_dependency_api.rb trunk/lib/rubygems/request_set/lockfile/parser.rb trunk/lib/rubygems/request_set/lockfile/tokenizer.rb trunk/lib/rubygems/request_set/lockfile.rb trunk/lib/rubygems/request_set.rb trunk/lib/rubygems/requirement.rb trunk/lib/rubygems/resolver/activation_request.rb trunk/lib/rubygems/resolver/best_set.rb trunk/lib/rubygems/resolver/installer_set.rb trunk/lib/rubygems/resolver/lock_set.rb trunk/lib/rubygems/resolver/lock_specification.rb trunk/lib/rubygems/resolver/requirement_list.rb trunk/lib/rubygems/resolver/specification.rb trunk/lib/rubygems/resolver/stats.rb trunk/lib/rubygems/resolver.rb trunk/lib/rubygems/security/signer.rb trunk/lib/rubygems/server.rb trunk/lib/rubygems/source_list.rb trunk/lib/rubygems/spec_fetcher.rb trunk/lib/rubygems/specification.rb trunk/lib/rubygems/specification_policy.rb trunk/lib/rubygems/stub_specification.rb trunk/lib/rubygems/syck_hack.rb trunk/lib/rubygems/test_case.rb trunk/lib/rubygems/test_utilities.rb trunk/lib/rubygems/text.rb trunk/lib/rubygems/uninstaller.rb trunk/lib/rubygems/user_interaction.rb trunk/lib/rubygems/util/licenses.rb trunk/lib/rubygems/util/list.rb trunk/lib/rubygems/util.rb trunk/lib/rubygems/validator.rb trunk/lib/rubygems/version.rb trunk/lib/rubygems.rb trunk/test/rubygems/plugin/load/rubygems_plugin.rb trunk/test/rubygems/test_deprecate.rb trunk/test/rubygems/test_gem.rb trunk/test/rubygems/test_gem_available_set.rb trunk/test/rubygems/test_gem_bundler_version_finder.rb trunk/test/rubygems/test_gem_command.rb trunk/test/rubygems/test_gem_commands_cleanup_command.rb trunk/test/rubygems/test_gem_commands_environment_command.rb trunk/test/rubygems/test_gem_commands_help_command.rb trunk/test/rubygems/test_gem_commands_info_command.rb trunk/test/rubygems/test_gem_commands_install_command.rb trunk/test/rubygems/test_gem_commands_mirror.rb trunk/test/rubygems/test_gem_commands_outdated_command.rb trunk/test/rubygems/test_gem_commands_pristine_command.rb trunk/test/rubygems/test_gem_commands_push_command.rb trunk/test/rubygems/test_gem_commands_query_command.rb trunk/test/rubygems/test_gem_commands_setup_command.rb trunk/test/rubygems/test_gem_commands_signin_command.rb trunk/test/rubygems/test_gem_commands_sources_command.rb trunk/test/rubygems/test_gem_commands_uninstall_command.rb trunk/test/rubygems/test_gem_commands_update_command.rb trunk/test/rubygems/test_gem_commands_yank_command.rb trunk/test/rubygems/test_gem_config_file.rb trunk/test/rubygems/test_gem_dependency_installer.rb trunk/test/rubygems/test_gem_dependency_list.rb trunk/test/rubygems/test_gem_ext_builder.rb trunk/test/rubygems/test_gem_ext_rake_builder.rb trunk/test/rubygems/test_gem_gemcutter_utilities.rb trunk/test/rubygems/test_gem_indexer.rb trunk/test/rubygems/test_gem_install_update_options.rb trunk/test/rubygems/test_gem_installer.rb trunk/test/rubygems/test_gem_package.rb trunk/test/rubygems/test_gem_package_tar_reader_entry.rb trunk/test/rubygems/test_gem_package_tar_writer.rb trunk/test/rubygems/test_gem_path_support.rb trunk/test/rubygems/test_gem_platform.rb trunk/test/rubygems/test_gem_rdoc.rb trunk/test/rubygems/test_gem_remote_fetcher.rb trunk/test/rubygems/test_gem_request.rb trunk/test/rubygems/test_gem_request_connection_pools.rb trunk/test/rubygems/test_gem_request_set.rb trunk/test/rubygems/test_gem_request_set_gem_dependency_api.rb trunk/test/rubygems/test_gem_request_set_lockfile.rb trunk/test/rubygems/test_gem_request_set_lockfile_parser.rb trunk/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb trunk/test/rubygems/test_gem_requirement.rb trunk/test/rubygems/test_gem_resolver.rb trunk/test/rubygems/test_gem_resolver_index_specification.rb trunk/test/rubygems/test_gem_resolver_installer_set.rb trunk/test/rubygems/test_gem_resolver_specification.rb trunk/test/rubygems/test_gem_security.rb trunk/test/rubygems/test_gem_server.rb trunk/test/rubygems/test_gem_silent_ui.rb trunk/test/rubygems/test_gem_source.rb trunk/test/rubygems/test_gem_source_fetch_problem.rb trunk/test/rubygems/test_gem_source_git.rb trunk/test/rubygems/test_gem_source_installed.rb trunk/test/rubygems/test_gem_source_list.rb trunk/test/rubygems/test_gem_source_local.rb trunk/test/rubygems/test_gem_source_lock.rb trunk/test/rubygems/test_gem_source_specific_file.rb trunk/test/rubygems/test_gem_source_vendor.rb trunk/test/rubygems/test_gem_specification.rb trunk/test/rubygems/test_gem_stream_ui.rb trunk/test/rubygems/test_gem_stub_specification.rb trunk/test/rubygems/test_gem_text.rb trunk/test/rubygems/test_gem_uninstaller.rb trunk/test/rubygems/test_gem_util.rb trunk/test/rubygems/test_gem_version.rb trunk/test/rubygems/test_kernel.rb trunk/test/rubygems/test_remote_fetch_error.rb trunk/test/rubygems/test_require.rb Index: lib/rubygems/commands/signin_command.rb =================================================================== --- lib/rubygems/commands/signin_command.rb (revision 67073) +++ lib/rubygems/commands/signin_command.rb (revision 67074) @@ -3,6 +3,7 @@ require 'rubygems/command' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/signin_command.rb#L3 require 'rubygems/gemcutter_utilities' class Gem::Commands::SigninCommand < Gem::Command + include Gem::GemcutterUtilities def initialize Index: lib/rubygems/commands/lock_command.rb =================================================================== --- lib/rubygems/commands/lock_command.rb (revision 67073) +++ lib/rubygems/commands/lock_command.rb (revision 67074) @@ -100,9 +100,9 @@ lock it down to the exact version. https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/lock_command.rb#L100 end def spec_path(gem_full_name) - gemspecs = Gem.path.map { |path| + gemspecs = Gem.path.map do |path| File.join path, "specifications", "#{gem_full_name}.gemspec" - } + end gemspecs.find { |path| File.exist? path } end Index: lib/rubygems/commands/build_command.rb =================================================================== --- lib/rubygems/commands/build_command.rb (revision 67073) +++ lib/rubygems/commands/build_command.rb (revision 67074) @@ -96,4 +96,5 @@ Gems can be saved to a specified filenam https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/build_command.rb#L96 terminate_interaction 1 end end + end Index: lib/rubygems/commands/yank_command.rb =================================================================== --- lib/rubygems/commands/yank_command.rb (revision 67073) +++ lib/rubygems/commands/yank_command.rb (revision 67074) @@ -5,6 +5,7 @@ require 'rubygems/version_option' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/yank_command.rb#L5 require 'rubygems/gemcutter_utilities' class Gem::Commands::YankCommand < Gem::Command + include Gem::LocalRemoteOptions include Gem::VersionOption include Gem::GemcutterUtilities Index: lib/rubygems/commands/outdated_command.rb =================================================================== --- lib/rubygems/commands/outdated_command.rb (revision 67073) +++ lib/rubygems/commands/outdated_command.rb (revision 67074) @@ -30,4 +30,5 @@ update the gems with the update or insta https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/outdated_command.rb#L30 say "#{spec.name} (#{spec.version} < #{remote_version})" end end + end Index: lib/rubygems/commands/update_command.rb =================================================================== --- lib/rubygems/commands/update_command.rb (revision 67073) +++ lib/rubygems/commands/update_command.rb (revision 67074) @@ -194,7 +194,7 @@ command to remove old versions. https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/update_command.rb#L194 } gems_to_update = which_to_update hig, options[:args], :system - _, up_ver = gems_to_update.first + _, up_ver = gems_to_update.first target = if update_latest up_ver Index: lib/rubygems/commands/info_command.rb =================================================================== --- lib/rubygems/commands/info_command.rb (revision 67073) +++ lib/rubygems/commands/info_command.rb (revision 67074) @@ -4,6 +4,7 @@ require 'rubygems/command' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/info_command.rb#L4 require 'rubygems/commands/query_command' class Gem::Commands::InfoCommand < Gem::Commands::QueryCommand + def initialize super "info", "Show information for the given gem" @@ -30,4 +31,5 @@ class Gem::Commands::InfoCommand < Gem:: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/info_command.rb#L31 def defaults_str "--local" end + end Index: lib/rubygems/commands/which_command.rb =================================================================== --- lib/rubygems/commands/which_command.rb (revision 67073) +++ lib/rubygems/commands/which_command.rb (revision 67074) @@ -2,6 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/which_command.rb#L2 require 'rubygems/command' class Gem::Commands::WhichCommand < Gem::Command + def initialize super 'which', 'Find the location of a library file you can require', :search_gems_first => false, :show_all => false Index: lib/rubygems/commands/mirror_command.rb =================================================================== --- lib/rubygems/commands/mirror_command.rb (revision 67073) +++ lib/rubygems/commands/mirror_command.rb (revision 67074) @@ -3,6 +3,7 @@ require 'rubygems/command' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/mirror_command.rb#L3 unless defined? Gem::Commands::MirrorCommand class Gem::Commands::MirrorCommand < Gem::Command + def initialize super('mirror', 'Mirror all gem files (requires rubygems-mirror)') begin Index: lib/rubygems/commands/rdoc_command.rb =================================================================== --- lib/rubygems/commands/rdoc_command.rb (revision 67073) +++ lib/rubygems/commands/rdoc_command.rb (revision 67074) @@ -5,6 +5,7 @@ require 'rubygems/rdoc' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/rdoc_command.rb#L5 require 'fileutils' class Gem::Commands::RdocCommand < Gem::Command + include Gem::VersionOption def initialize Index: lib/rubygems/commands/pristine_command.rb =================================================================== --- lib/rubygems/commands/pristine_command.rb (revision 67073) +++ lib/rubygems/commands/pristine_command.rb (revision 67074) @@ -183,4 +183,5 @@ extensions will be restored. https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/pristine_command.rb#L183 say "Restored #{spec.full_name}" end end + end Index: lib/rubygems/mock_gem_ui.rb =================================================================== --- lib/rubygems/mock_gem_ui.rb (revision 67073) +++ lib/rubygems/mock_gem_ui.rb (revision 67074) @@ -7,6 +7,7 @@ require 'rubygems/user_interaction' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/mock_gem_ui.rb#L7 # retrieval during tests. class Gem::MockGemUi < Gem::StreamUI + ## # Raised when you haven't provided enough input to your MockGemUi @@ -19,12 +20,14 @@ class Gem::MockGemUi < Gem::StreamUI https://github.com/ruby/ruby/blob/trunk/lib/rubygems/mock_gem_ui.rb#L20 end class TermError < RuntimeError + attr_reader :exit_code def initialize(exit_code) super @exit_code = exit_code end + end class SystemExitException < RuntimeError; end Index: lib/rubygems/local_remote_options.rb =================================================================== --- lib/rubygems/local_remote_options.rb (revision 67073) +++ lib/rubygems/local_remote_options.rb (revision 67074) @@ -26,7 +26,7 @@ module Gem::LocalRemoteOptions https://github.com/ruby/ruby/blob/trunk/lib/rubygems/local_remote_options.rb#L26 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 Index: lib/rubygems/basic_specification.rb =================================================================== --- lib/rubygems/basic_specification.rb (revision 67073) +++ lib/rubygems/basic_specification.rb (revision 67074) @@ -329,4 +329,5 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L329 false end end + end Index: lib/rubygems/validator.rb =================================================================== --- lib/rubygems/validator.rb (revision 67073) +++ lib/rubygems/validator.rb (revision 67074) @@ -25,7 +25,7 @@ class Gem::Validator https://github.com/ruby/ruby/blob/trunk/lib/rubygems/validator.rb#L25 installed_files = [] Find.find gem_directory do |file_name| - fn = file_name[gem_directory.size..file_name.size-1].sub(/^\//, "") + fn = file_name[gem_directory.size..file_name.size - 1].sub(/^\//, "") installed_files << fn unless fn =~ /CVS/ || fn.empty? || File.directory?(file_name) end @@ -91,17 +91,17 @@ class Gem::Validator https://github.com/ruby/ruby/blob/trunk/lib/rubygems/validator.rb#L91 File.open gem_path, Gem.binary_mode do |file| package = Gem::Package.new gem_path - good, gone = package.contents.partition { |file_name| + good, gone = package.contents.partition do |file_name| File.exist? File.join(gem_directory, file_name) - } + end gone.sort.each do |path| errors[gem_name][path] = "Missing file" end - good, unreadable = good.partition { |file_name| + good, unreadable = good.partition do |file_name| File.readable? File.join(gem_directory, file_name) - } + end unreadable.sort.each do |path| errors[gem_name][path] = "Unreadable file" @@ -141,4 +141,5 @@ class Gem::Validator https://github.com/ruby/ruby/blob/trunk/lib/rubygems/validator.rb#L141 errors end + end Index: lib/rubygems/installer_test_case.rb =================================================================== --- lib/rubygems/installer_test_case.rb (revision 67073) +++ lib/rubygems/installer_test_case.rb (revision 67074) @@ -58,6 +58,7 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer_test_case.rb#L58 # Available through requiring rubygems/installer_test_case attr_writer :wrappers + end ## @@ -150,10 +151,15 @@ class Gem::InstallerTestCase < Gem::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer_test_case.rb#L151 FileUtils.mkdir_p 'bin' FileUtils.mkdir_p 'lib' FileUtils.mkdir_p File.join('ext', 'a') + File.open File.join('bin', 'executable'), 'w' do |f| f.puts "raise 'ran executable'" end - File.open File.join('lib', 'code.rb'), 'w' do |f| f.puts '1' end + + File.open File.join('lib', 'code.rb'), 'w' do |f| + f.puts '1' + end + File.open File.join('ext', 'a', 'mkrf_conf.rb'), 'w' do |f| f << <<-EOF File.open 'Rakefile', 'w' do |rf| rf.puts "task :default" end Index: lib/rubygems/path_support.rb =================================================================== --- lib/rubygems/path_support.rb (revision 67073) +++ lib/rubygems/path_support.rb (revision 67074) @@ -5,6 +5,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/path_support.rb#L5 # to the rest of RubyGems. # class Gem::PathSupport + ## # The default system path for managing Gems. attr_reader :home @@ -87,4 +88,5 @@ class Gem::PathSupport https://github.com/ruby/ruby/blob/trunk/lib/rubygems/path_support.rb#L88 path end end + end Index: lib/rubygems/spec_fetcher.rb =================================================================== --- lib/rubygems/spec_fetcher.rb (revision 67073) +++ lib/rubygems/spec_fetcher.rb (revision 67074) @@ -189,7 +189,7 @@ class Gem::SpecFetcher https://github.com/ruby/ruby/blob/trunk/lib/rubygems/spec_fetcher.rb#L189 max = gem_name.size / 2 names = available_specs(type).first.values.flatten(1) - matches = names.map { |n| + matches = names.map do |n| next unless n.match_platform? distance = levenshtein_distance gem_name, n.name.downcase.tr('_-', '') @@ -199,7 +199,7 @@ class Gem::SpecFetcher https://github.com/ruby/ruby/blob/trunk/lib/rubygems/spec_fetcher.rb#L199 return [n.name] if distance == 0 [n.name, distance] - }.compact + end.compact matches = if matches.empty? && type != :prerelease suggest_gems_from_name gem_name, :prerelease Index: lib/rubygems/gemcutter_utilities.rb =================================================================== --- lib/rubygems/gemcutter_utilities.rb (revision 67073) +++ lib/rubygems/gemcutter_utilities.rb (revision 67074) @@ -63,7 +63,7 @@ module Gem::GemcutterUtilities https://github.com/ruby/ruby/blob/trunk/lib/rubygems/gemcutter_utilities.rb#L63 env_rubygems_host = nil if env_rubygems_host and env_rubygems_host.empty? - env_rubygems_host|| configured_host + env_rubygems_host || configured_host end end @@ -116,7 +116,7 @@ module Gem::GemcutterUtilities https://github.com/ruby/ruby/blob/trunk/lib/rubygems/gemcutter_utilities.rb#L116 say "Don't have an account yet? " + "Create one at #{sign_in_host}/sign_up" - email = ask " Email: " + email = ask " Email: " password = ask_for_password "Password: " say "\n" Index: lib/rubygems/dependency_installer.rb =================================================================== --- lib/rubygems/dependency_installer.rb (revision 67073) +++ lib/rubygems/dependency_installer.rb (revision 67074) @@ -29,7 +29,7 @@ class Gem::DependencyInstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency_installer.rb#L29 :wrappers => true, :build_args => nil, :build_docs_in_background => false, - :install_as_default => false + :install_as_default => false }.freeze ## @@ -336,15 +336,15 @@ class Gem::DependencyInstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency_installer.rb#L336 # REFACTOR maybe abstract away using Gem::Specification.include? so # that this isn't dependent only on the currently installed gems - dependency_list.specs.reject! { |spec| + dependency_list.specs.reject! do |spec| not keep_names.include?(spec.full_name) and Gem::Specification.include?(spec) - } + end unless dependency_list.ok? or @ignore_dependencies or @force - reason = dependency_list.why_not_ok?.map { |k,v| + reason = dependency_list.why_not_ok?.map do |k,v| "#{k} requires #{v.join(", ")}" - }.join("; ") + end.join("; ") raise Gem::DependencyError, "Unable to resolve dependencies: #{reason}" end Index: lib/rubygems/available_set.rb =================================================================== --- lib/rubygems/available_set.rb (revision 67073) +++ lib/rubygems/available_set.rb (revision 67074) @@ -162,4 +162,5 @@ class Gem::AvailableSet https://github.com/ruby/ruby/blob/trunk/lib/rubygems/available_set.rb#L162 def inject_into_list(dep_list) @set.each { |t| dep_list.add t.spec } end + end Index: lib/rubygems/ext/builder.rb =================================================================== --- lib/rubygems/ext/builder.rb (revision 67073) +++ lib/rubygems/ext/builder.rb (revision 67074) @@ -240,7 +240,9 @@ EOF https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/builder.rb#L240 FileUtils.mkdir_p @spec.extension_dir - File.open destination, 'wb' do |io| io.puts output end + File.open destination, 'wb' do |io| + io.puts output + end destination end Index: lib/rubygems/ext/cmake_builder.rb =================================================================== --- lib/rubygems/ext/cmake_builder.rb (revision 67073) +++ lib/rubygems/ext/cmake_builder.rb (revision 67074) @@ -2,6 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/cmake_builder.rb#L2 require 'rubygems/command' class Gem::Ext::CmakeBuilder < Gem::Ext::Builder + def self.build(extension, dest_path, results, args=[], lib_dir=nil) unless File.exist?('Makefile') cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}" @@ -14,4 +15,5 @@ class Gem::Ext::CmakeBuilder < Gem::Ext: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/cmake_builder.rb#L15 results end + end Index: lib/rubygems/ext/ext_conf_builder.rb =================================================================== --- lib/rubygems/ext/ext_conf_builder.rb (revision 67073) +++ lib/rubygems/ext/ext_conf_builder.rb (revision 67074) @@ -10,6 +10,7 @@ require 'tempfile' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/ext_conf_builder.rb#L10 require 'shellwords' class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder + FileEntry = FileUtils::Entry_ # :nodoc: def self.build(extension, dest_path, results, args=[], lib_dir=nil) @@ -88,7 +89,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ex https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/ext_conf_builder.rb#L89 private def self.get_relative_path(path) - path[0..Dir.pwd.length-1] = '.' if path.start_with?(Dir.pwd) + path[0..Dir.pwd.length - 1] = '.' if path.start_with?(Dir.pwd) path end Index: lib/rubygems/syck_hack.rb =================================================================== --- lib/rubygems/syck_hack.rb (revision 67073) +++ lib/rubygems/syck_hack.rb (revision 67074) @@ -40,11 +40,13 @@ module YAML # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/syck_hack.rb#L40 # should. module Syck class DefaultKey + remove_method :to_s rescue nil def to_s '=' end + end end Index: lib/rubygems/request_set.rb =================================================================== --- lib/rubygems/request_set.rb (revision 67073) +++ lib/rubygems/request_set.rb (revision 67074) @@ -457,9 +457,9 @@ class Gem::RequestSet https://github.com/ruby/ruby/blob/trunk/lib/rubygems/request_set.rb#L457 node.spec.dependencies.each do |dep| next if dep.type == :development and not @development - match = @requests.find { |r| + match = @requests.find do |r| dep.match? r.spec.name, r.spec.version, @prerelease - } + end unless match next if dep.type == :development and @development_shallow Index: lib/rubygems/config_file.rb =================================================================== --- lib/rubygems/config_file.rb (revision 67073) +++ lib/rubygems/config_file.rb (revision 67074) @@ -484,4 +484,5 @@ if you believe they were disclosed to a https://github.com/ruby/ruby/blob/trunk/lib/rubygems/config_file.rb#L484 attr_reader :hash protected :hash + end Index: lib/rubygems/errors.rb =================================================================== --- lib/rubygems/errors.rb (revision 67073) +++ lib/rubygems/errors.rb (revision 67074) @@ -13,11 +13,13 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/rubygems/errors.rb#L13 # already activated gems or that RubyGems is otherwise unable to activate. class LoadError < ::LoadError + # Name of gem attr_accessor :name # Version requirement of gem attr_accessor :requirement + end ## @@ -25,6 +27,7 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/rubygems/errors.rb#L27 # system. Instead of rescuing from this class, make sure to rescue from the # superclass Gem::LoadError to catch all types of load errors. class MissingSpecError < Gem::LoadError + def initialize(name, requirement) @name = name @requirement = requirement @@ -41,6 +44,7 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/rubygems/errors.rb#L44 total = Gem::Specification.stubs.size "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n" end + end ## @@ -48,6 +52,7 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/rubygems/errors.rb#L52 # not the requested version. Instead of rescuing from this class, make sure to # rescue from the superclass Gem::LoadError to catch all types of load errors. class (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/