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

ruby-changes:70243

From: David <ko1@a...>
Date: Wed, 15 Dec 2021 19:47:00 +0900 (JST)
Subject: [ruby-changes:70243] 890a6b432c (master): [rubygems/rubygems] Unify duplicated helper

https://git.ruby-lang.org/ruby.git/commit/?id=890a6b432c

From 890a6b432c7f9b7e3160af31cedb440e53e2d79b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Mon, 13 Dec 2021 16:50:04 +0100
Subject: [rubygems/rubygems] Unify duplicated helper

https://github.com/rubygems/rubygems/commit/c6ef75424d
---
 test/rubygems/helper.rb                 | 7 +++++++
 test/rubygems/test_gem_specification.rb | 7 -------
 test/rubygems/test_require.rb           | 7 -------
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb
index 40ed62fc77c..b0ad5aafcd6 100644
--- a/test/rubygems/helper.rb
+++ b/test/rubygems/helper.rb
@@ -1300,6 +1300,13 @@ Also, a list: https://github.com/ruby/ruby/blob/trunk/test/rubygems/helper.rb#L1300
     Gem.instance_variable_set :@ruby, orig_ruby
   end
 
+  def silence_warnings
+    old_verbose, $VERBOSE = $VERBOSE, false
+    yield
+  ensure
+    $VERBOSE = old_verbose
+  end
+
   class << self
     # :nodoc:
     ##
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 375bacf9bd6..3062b66bc6f 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -3745,11 +3745,4 @@ end https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3745
       end
     end
   end
-
-  def silence_warnings
-    old_verbose, $VERBOSE = $VERBOSE, false
-    yield
-  ensure
-    $VERBOSE = old_verbose
-  end
 end
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
index 56774116a92..80c95b26a35 100644
--- a/test/rubygems/test_require.rb
+++ b/test/rubygems/test_require.rb
@@ -700,13 +700,6 @@ class TestGemRequire < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_require.rb#L700
     !ENV["GEM_COMMAND"].nil?
   end
 
-  def silence_warnings
-    old_verbose, $VERBOSE = $VERBOSE, false
-    yield
-  ensure
-    $VERBOSE = old_verbose
-  end
-
   def util_install_extension_file(name)
     spec = quick_gem name
     util_build_gem spec
-- 
cgit v1.2.1


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

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