summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2025-11-14 12:04:08 +0900
committergit <svn-admin@ruby-lang.org>2025-11-14 06:09:38 +0000
commitecec9dc606c0816ddff241485389b892d19da144 (patch)
tree86d8648a51136fe2e9fc99eb206ea4f6676106cd
parent31928c10a25c8ad14b4e7d7378afa6d83a1ecec0 (diff)
[ruby/rubygems] Removed deprecated Gem::Util.silent_system
https://github.com/ruby/rubygems/commit/728269cc4a
-rw-r--r--lib/rubygems/util.rb22
-rw-r--r--test/rubygems/test_gem_util.rb11
2 files changed, 0 insertions, 33 deletions
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.
@@ -57,26 +55,6 @@ module Gem::Util
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+.
def self.traverse_parents(directory, &block)
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"