Skip to content

Commit 728269c

Browse files
committed
Removed deprecated Gem::Util.silent_system
1 parent fbf38fc commit 728269c

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

lib/rubygems/util.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require_relative "deprecate"
4-
53
##
64
# This module contains various utility methods as module methods.
75

@@ -56,26 +54,6 @@ def self.popen(*command)
5654
IO.popen command, &:read
5755
end
5856

59-
##
60-
# Invokes system, but silences all output.
61-
62-
def self.silent_system(*command)
63-
opt = { out: IO::NULL, err: [:child, :out] }
64-
if Hash === command.last
65-
opt.update(command.last)
66-
cmds = command[0...-1]
67-
else
68-
cmds = command.dup
69-
end
70-
system(*(cmds << opt))
71-
end
72-
73-
class << self
74-
extend Gem::Deprecate
75-
76-
rubygems_deprecate :silent_system
77-
end
78-
7957
##
8058
# Enumerates the parents of +directory+.
8159

test/rubygems/test_gem_util.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ def test_class_popen
1313
end
1414
end
1515

16-
def test_silent_system
17-
pend if Gem.java_platform?
18-
Gem::Deprecate.skip_during do
19-
out, err = capture_output do
20-
Gem::Util.silent_system(*ruby_with_rubygems_in_load_path, "-e", 'puts "hello"; warn "hello"')
21-
end
22-
assert_empty out
23-
assert_empty err
24-
end
25-
end
26-
2716
def test_traverse_parents
2817
FileUtils.mkdir_p "a/b/c"
2918

0 commit comments

Comments
 (0)