diff --git a/lib/rubygems/util.rb b/lib/rubygems/util.rb index 51f9c2029f..ee4106c6ce 100644 --- a/lib/rubygems/util.rb +++ b/lib/rubygems/util.rb @@ -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+. diff --git a/test/rubygems/test_gem_util.rb b/test/rubygems/test_gem_util.rb index 608210a903..9688d066db 100644 --- a/test/rubygems/test_gem_util.rb +++ b/test/rubygems/test_gem_util.rb @@ -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"