[ruby/rubygems] Removed deprecated Gem::Util.silent_system

https://github.com/ruby/rubygems/commit/728269cc4a
This commit is contained in:
Hiroshi SHIBATA 2025-11-14 12:04:08 +09:00 committed by git
parent 31928c10a2
commit ecec9dc606
2 changed files with 0 additions and 33 deletions

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require_relative "deprecate"
##
# This module contains various utility methods as module methods.
@ -56,26 +54,6 @@ module Gem::Util
IO.popen command, &:read
end
##
# Invokes system, but silences all output.
def self.silent_system(*command)
opt = { out: IO::NULL, err: [:child, :out] }
if Hash === command.last
opt.update(command.last)
cmds = command[0...-1]
else
cmds = command.dup
end
system(*(cmds << opt))
end
class << self
extend Gem::Deprecate
rubygems_deprecate :silent_system
end
##
# Enumerates the parents of +directory+.

View File

@ -13,17 +13,6 @@ class TestGemUtil < Gem::TestCase
end
end
def test_silent_system
pend if Gem.java_platform?
Gem::Deprecate.skip_during do
out, err = capture_output do
Gem::Util.silent_system(*ruby_with_rubygems_in_load_path, "-e", 'puts "hello"; warn "hello"')
end
assert_empty out
assert_empty err
end
end
def test_traverse_parents
FileUtils.mkdir_p "a/b/c"