1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Unify duplicated helper

c6ef75424d
This commit is contained in:
David Rodríguez 2021-12-13 16:50:04 +01:00 committed by git
parent de01011da3
commit 890a6b432c
3 changed files with 7 additions and 14 deletions

View file

@ -1300,6 +1300,13 @@ Also, a list:
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:
##

View file

@ -3745,11 +3745,4 @@ end
end
end
end
def silence_warnings
old_verbose, $VERBOSE = $VERBOSE, false
yield
ensure
$VERBOSE = old_verbose
end
end

View file

@ -700,13 +700,6 @@ class TestGemRequire < Gem::TestCase
!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