[前][次][番号順一覧][スレッド一覧]

ruby-changes:65118

From: Hiroshi <ko1@a...>
Date: Tue, 2 Feb 2021 21:30:30 +0900 (JST)
Subject: [ruby-changes:65118] 6673b60f3d (ruby_3_0): Merge RubyGems-3.1.7

https://git.ruby-lang.org/ruby.git/commit/?id=6673b60f3d

From 6673b60f3d86e7431a2ae7b4af7249a01d20f71c Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Tue, 2 Feb 2021 20:23:57 +0900
Subject: Merge RubyGems-3.1.7

---
 lib/rubygems.rb                                                    | 2 +-
 lib/rubygems/installer_uninstaller_utils.rb                        | 7 ++++++-
 .../resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb    | 2 +-
 lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb            | 2 +-
 test/rubygems/test_gem_installer.rb                                | 2 ++
 test/rubygems/test_gem_stream_ui.rb                                | 2 +-
 6 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index fc11bf4..f90e6c5 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -8,7 +8,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L8
 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 e81ed4c..2c8b7c6 100644
--- a/lib/rubygems/installer_uninstaller_utils.rb
+++ b/lib/rubygems/installer_uninstaller_utils.rb
@@ -6,11 +6,16 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer_uninstaller_utils.rb#L6
 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 88b6580..f4cc333 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb#L128
 
       # 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 2ec6b06..a6e182e 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb#L34
 
   # 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 4ce7e92..5652d86 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -821,6 +821,8 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L821
 
     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 ca6dbc6..a62e9ea 100644
--- a/test/rubygems/test_gem_stream_ui.rb
+++ b/test/rubygems/test_gem_stream_ui.rb
@@ -5,7 +5,7 @@ require 'timeout' https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_stream_ui.rb#L5
 
 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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]