summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-17 03:55:02 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-17 03:55:02 +0000
commitd35a2bd4dfdb974ff741736ad27b420c40365515 (patch)
tree2a8542408af557908a28fba1df80c21ecf10f7aa
parent1133596e6ba77ddeb93552fc8274a3bbdd87e6f3 (diff)
* lib/rubygems/*, test/rubygems/*: Update to RubyGems 2.4.4
master (2f6e42e). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-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
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb24
12 files changed, 29 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index ec2e4fa219b..6c75b3abc17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Nov 17 12:54:56 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+
+ * lib/rubygems/*, test/rubygems/*: Update to RubyGems 2.4.4
+ master (2f6e42e).
+
Mon Nov 17 06:13:06 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* proc.c (proc_binding): use the original iseq on a binding from
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index dc30a13303f..b3b430283f3 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 9a1c6c532f1..4b944f18be2 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 b1320896120..001dd777cc4 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 b72a540dc8d..5924d2fc6b9 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 1c7f8e709f6..f94fb1bcb83 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 65bcbb22836..d7b228d8932 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 607827c47ef..d42a7bd9de3 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 27ee99c20d4..7a0a6e6e744 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 61c8884af78..c9a1858b98a 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 917b4ea5aab..44ff2d33ff3 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
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index 7e08a8c663c..883e1bd8e44 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -77,30 +77,6 @@ gems:
DIR = File.expand_path(File.dirname(__FILE__))
- module RemoteFetcherCleanup
- refine Gem::RemoteFetcher do
- def close_all
- @pools.each_value {|pool| pool.close_all}
- end
- end
- refine Gem::Request::ConnectionPools do
- def close_all
- @pools.each_value {|pool| pool.close_all}
- end
- end
- refine Gem::Request::HTTPPool do
- def close_all
- until @queue.empty?
- if connection = @queue.pop(true) and connection.started?
- connection.finish
- end
- end
- @queue.push(nil)
- end
- end
- end
- using RemoteFetcherCleanup
-
def setup
@proxies = %w[http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
@old_proxies = @proxies.map {|k| ENV[k] }