summaryrefslogtreecommitdiff
path: root/lib/rubygems/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/util.rb')
-rw-r--r--lib/rubygems/util.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/util.rb b/lib/rubygems/util.rb
index 5c65dcc424..51f9c2029f 100644
--- a/lib/rubygems/util.rb
+++ b/lib/rubygems/util.rb
@@ -60,7 +60,7 @@ module Gem::Util
# Invokes system, but silences all output.
def self.silent_system(*command)
- opt = { :out => IO::NULL, :err => [:child, :out] }
+ opt = { out: IO::NULL, err: [:child, :out] }
if Hash === command.last
opt.update(command.last)
cmds = command[0...-1]
@@ -105,11 +105,11 @@ module Gem::Util
end
##
- # Corrects +path+ (usually returned by `URI.parse().path` on Windows), that
+ # Corrects +path+ (usually returned by `Gem::URI.parse().path` on Windows), that
# comes with a leading slash.
def self.correct_for_windows_path(path)
- if path[0].chr == "/" && path[1].chr =~ /[a-z]/i && path[2].chr == ":"
+ if path[0].chr == "/" && path[1].chr.match?(/[a-z]/i) && path[2].chr == ":"
path[1..-1]
else
path