diff --git a/lib/rubygems.rb b/lib/rubygems.rb index fc11bf4fa7..f90e6c5c85 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -8,7 +8,7 @@ require 'rbconfig' module Gem - VERSION = "3.2.6".freeze + VERSION = "3.2.7".freeze end # Must be first since it unloads the prelude from 1.9.2 diff --git a/lib/rubygems/installer_uninstaller_utils.rb b/lib/rubygems/installer_uninstaller_utils.rb index e81ed4cba3..2c8b7c635e 100644 --- a/lib/rubygems/installer_uninstaller_utils.rb +++ b/lib/rubygems/installer_uninstaller_utils.rb @@ -6,11 +6,16 @@ module Gem::InstallerUninstallerUtils def regenerate_plugins_for(spec, plugins_dir) + plugins = spec.plugins + return if plugins.empty? + + require 'pathname' + spec.plugins.each do |plugin| plugin_script_path = File.join plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}" File.open plugin_script_path, 'wb' do |file| - file.puts "require '#{plugin}'" + file.puts "require_relative '#{Pathname.new(plugin).relative_path_from(Pathname.new(plugins_dir))}'" end verbose plugin_script_path diff --git a/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb index 88b6580a52..f4cc333dd1 100644 --- a/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +++ b/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb @@ -128,7 +128,7 @@ module Gem::Resolver::Molinillo # Is there a path from `self` to `other` following edges in the # dependency graph? - # @return true iff there is a path following edges within this {#graph} + # @return whether there is a path following edges within this {#graph} def path_to?(other) _path_to?(other) end diff --git a/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb b/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb index 2ec6b068ac..a6e182e84d 100644 --- a/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +++ b/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb @@ -34,7 +34,7 @@ module Gem::Resolver::Molinillo # An error caused by attempting to fulfil a dependency that was circular # - # @note This exception will be thrown iff a {Vertex} is added to a + # @note This exception will be thrown if and only if a {Vertex} is added to a # {DependencyGraph} that has a {DependencyGraph::Vertex#path_to?} an # existing {DependencyGraph::Vertex} class CircularDependencyError < ResolverError diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 4ce7e92442..5652d86331 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -821,6 +821,8 @@ gem 'other', version assert !File.exist?(system_path), 'plugin written incorrect written to system plugins_dir' assert File.exist?(build_root_path), 'plugin not written to build_root' + + refute_includes File.read(build_root_path), build_root end def test_keeps_plugins_up_to_date diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb index ca6dbc6a8b..a62e9ea0cf 100644 --- a/test/rubygems/test_gem_stream_ui.rb +++ b/test/rubygems/test_gem_stream_ui.rb @@ -5,7 +5,7 @@ require 'timeout' class TestGemStreamUI < Gem::TestCase # increase timeout with MJIT for --jit-wait testing - mjit_enabled = defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + mjit_enabled = defined?(RubyVM::JIT) ? RubyVM::JIT.enabled? : defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !mjit_enabled) ? 0.1 : 1.0 module IsTty