* lib/rubygems: Import RubyGems 1.8.8. Fixes encoding of YAML gemspec

from gems.  Github Issue #149


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-08-12 00:15:42 +00:00
Родитель 65bfe20244
Коммит 5e4de2a265
3 изменённых файлов: 13 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Aug 12 09:00:24 2011 Eric Hodel <drbrain@segment7.net>
* lib/rubygems: Import RubyGems 1.8.8. Fixes encoding of YAML gemspec
from gems. Github Issue #149
Fri Aug 12 08:17:46 2011 Tanaka Akira <akr@fsij.org> Fri Aug 12 08:17:46 2011 Tanaka Akira <akr@fsij.org>
* ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for * ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for

Просмотреть файл

@ -118,7 +118,7 @@ require "rubygems/deprecate"
# -The RubyGems Team # -The RubyGems Team
module Gem module Gem
VERSION = '1.8.7' VERSION = '1.8.8'
## ##
# Raised when RubyGems is unable to load or activate a gem. Contains the # Raised when RubyGems is unable to load or activate a gem. Contains the

Просмотреть файл

@ -49,8 +49,13 @@ class Gem::Package::TarInput
sio.rewind sio.rewind
end end
# TODO use Gem.gunzip # Ruby 1.8 doesn't have encoding and YAML is UTF-8
gzis = Zlib::GzipReader.new(sio || entry) args = [sio || entry]
args << { :external_encoding => Encoding::UTF_8 } if
Object.const_defined?(:Encoding)
gzis = Zlib::GzipReader.new(*args)
# YAML wants an instance of IO # YAML wants an instance of IO
@metadata = load_gemspec(gzis) @metadata = load_gemspec(gzis)
has_meta = true has_meta = true