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

ruby-changes:67454

From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:07:37 +0900 (JST)
Subject: [ruby-changes:67454] 590d2222a0 (master): [rubygems/rubygems] Remove helper method not buying us much

https://git.ruby-lang.org/ruby.git/commit/?id=590d2222a0

From 590d2222a0f803f30f0323d51b8bcb51d6023cea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Sun, 8 Aug 2021 10:43:38 +0200
Subject: [rubygems/rubygems] Remove helper method not buying us much

https://github.com/rubygems/rubygems/commit/81dc685d20
---
 test/rubygems/test_gem.rb              | 8 ++------
 test/rubygems/test_gem_path_support.rb | 8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 013daa0..da6fdc5 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -931,17 +931,13 @@ class TestGem < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem.rb#L931
     assert_equal true, Gem.loaded_specs.keys.include?('foo')
   end
 
-  def util_path
-    ENV.delete "GEM_HOME"
-    ENV.delete "GEM_PATH"
-  end
-
   def test_self_path
     assert_equal [Gem.dir], Gem.path
   end
 
   def test_self_path_default
-    util_path
+    ENV.delete "GEM_HOME"
+    ENV.delete "GEM_PATH"
 
     Gem.instance_variable_set :@paths, nil
 
diff --git a/test/rubygems/test_gem_path_support.rb b/test/rubygems/test_gem_path_support.rb
index 88a3cc2..394cba2 100644
--- a/test/rubygems/test_gem_path_support.rb
+++ b/test/rubygems/test_gem_path_support.rb
@@ -16,7 +16,7 @@ class TestGemPathSupport < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_path_support.rb#L16
 
     assert_equal ENV["GEM_HOME"], ps.home
 
-    expected = util_path
+    expected = ENV["GEM_PATH"].split(File::PATH_SEPARATOR)
     assert_equal expected, ps.path, "defaults to GEM_PATH"
   end
 
@@ -25,7 +25,7 @@ class TestGemPathSupport < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_path_support.rb#L25
 
     assert_equal File.join(@tempdir, "foo"), ps.home
 
-    expected = util_path + [File.join(@tempdir, 'foo')]
+    expected = ENV["GEM_PATH"].split(File::PATH_SEPARATOR) + [File.join(@tempdir, 'foo')]
     assert_equal expected, ps.path
   end
 
@@ -102,10 +102,6 @@ class TestGemPathSupport < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_path_support.rb#L102
     end
   end
 
-  def util_path
-    ENV["GEM_PATH"].split(File::PATH_SEPARATOR)
-  end
-
   def test_initialize_spec
     ENV["GEM_SPEC_CACHE"] = nil
 
-- 
cgit v1.1


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

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