1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
hsbt 2014-11-17 03:55:02 +00:00
parent 1133596e6b
commit d35a2bd4df
12 changed files with 29 additions and 35 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -84,8 +84,6 @@ command to remove old versions.
end
def execute
hig = {}
if options[:system] then
update_rubygems
return

View file

@ -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
##

View file

@ -235,7 +235,7 @@ class Gem::Indexer
sanitize spec
spec
rescue SignalException => e
rescue SignalException
alert_error "Received signal, exiting"
raise
rescue Exception => e

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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] }