summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb2
-rw-r--r--lib/rubygems/commands/contents_command.rb1
-rw-r--r--lib/rubygems/commands/update_command.rb2
-rw-r--r--lib/rubygems/dependency.rb2
-rw-r--r--lib/rubygems/indexer.rb2
-rw-r--r--lib/rubygems/package/old.rb4
-rw-r--r--lib/rubygems/remote_fetcher.rb6
-rw-r--r--lib/rubygems/request/connection_pools.rb6
-rw-r--r--lib/rubygems/request/http_pool.rb9
-rw-r--r--lib/rubygems/user_interaction.rb1
10 files changed, 24 insertions, 11 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index dc30a13303..b3b430283f 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -9,7 +9,7 @@ require 'rbconfig'
require 'thread'
module Gem
- VERSION = '2.4.3'
+ VERSION = '2.4.4'
end
# Must be first since it unloads the prelude from 1.9.2
diff --git a/lib/rubygems/commands/contents_command.rb b/lib/rubygems/commands/contents_command.rb
index 9a1c6c532f..4b944f18be 100644
--- a/lib/rubygems/commands/contents_command.rb
+++ b/lib/rubygems/commands/contents_command.rb
@@ -146,7 +146,6 @@ prefix or only the files that are requireable.
def path_description spec_dirs # :nodoc:
if spec_dirs.empty? then
- spec_dirs = Gem::Specification.dirs
"default gem paths"
else
"specified path"
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index b132089612..001dd777cc 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -84,8 +84,6 @@ command to remove old versions.
end
def execute
- hig = {}
-
if options[:system] then
update_rubygems
return
diff --git a/lib/rubygems/dependency.rb b/lib/rubygems/dependency.rb
index b72a540dc8..5924d2fc6b 100644
--- a/lib/rubygems/dependency.rb
+++ b/lib/rubygems/dependency.rb
@@ -281,7 +281,7 @@ class Gem::Dependency
}
end
- matches = matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed
+ matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed
end
##
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb
index 1c7f8e709f..f94fb1bcb8 100644
--- a/lib/rubygems/indexer.rb
+++ b/lib/rubygems/indexer.rb
@@ -235,7 +235,7 @@ class Gem::Indexer
sanitize spec
spec
- rescue SignalException => e
+ rescue SignalException
alert_error "Received signal, exiting"
raise
rescue Exception => e
diff --git a/lib/rubygems/package/old.rb b/lib/rubygems/package/old.rb
index 65bcbb2283..d7b228d893 100644
--- a/lib/rubygems/package/old.rb
+++ b/lib/rubygems/package/old.rb
@@ -153,10 +153,10 @@ class Gem::Package::Old < Gem::Package
begin
@spec = Gem::Specification.from_yaml yaml
- rescue yaml_error => e
+ rescue yaml_error
raise Gem::Exception, "Failed to parse gem specification out of gem file"
end
- rescue ArgumentError => e
+ rescue ArgumentError
raise Gem::Exception, "Failed to parse gem specification out of gem file"
end
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index 607827c47e..d42a7bd9de 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -326,7 +326,7 @@ class Gem::RemoteFetcher
def correct_for_windows_path(path)
if path[0].chr == '/' && path[1].chr =~ /[a-z]/i && path[2].chr == ':'
- path = path[1..-1]
+ path[1..-1]
else
path
end
@@ -352,6 +352,10 @@ class Gem::RemoteFetcher
uri.scheme.downcase == 'https'
end
+ def close_all
+ @pools.each_value {|pool| pool.close_all}
+ end
+
protected
# we have our own signing code here to avoid a dependency on the aws-sdk gem
diff --git a/lib/rubygems/request/connection_pools.rb b/lib/rubygems/request/connection_pools.rb
index 27ee99c20d..7a0a6e6e74 100644
--- a/lib/rubygems/request/connection_pools.rb
+++ b/lib/rubygems/request/connection_pools.rb
@@ -28,6 +28,10 @@ class Gem::Request::ConnectionPools # :nodoc:
end
end
+ def close_all
+ @pools.each_value {|pool| pool.close_all}
+ end
+
private
##
@@ -69,7 +73,7 @@ class Gem::Request::ConnectionPools # :nodoc:
Gem::UriFormatter.new(proxy_uri.password).unescape,
]
elsif no_proxy? uri.host, no_proxy then
- net_http_args += [nil, nil]
+ net_http_args + [nil, nil]
else
net_http_args
end
diff --git a/lib/rubygems/request/http_pool.rb b/lib/rubygems/request/http_pool.rb
index 61c8884af7..c9a1858b98 100644
--- a/lib/rubygems/request/http_pool.rb
+++ b/lib/rubygems/request/http_pool.rb
@@ -23,6 +23,15 @@ class Gem::Request::HTTPPool # :nodoc:
@queue.push connection
end
+ def close_all
+ until @queue.empty?
+ if connection = @queue.pop(true) and connection.started?
+ connection.finish
+ end
+ end
+ @queue.push(nil)
+ end
+
private
def make_connection
diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb
index 917b4ea5aa..44ff2d33ff 100644
--- a/lib/rubygems/user_interaction.rb
+++ b/lib/rubygems/user_interaction.rb
@@ -318,7 +318,6 @@ class Gem::StreamUI
elsif Gem.win_platform?
def _gets_noecho
require "Win32API"
- char = nil
password = ''
while char = Win32API.new("crtdll", "_getch", [ ], "L").Call do