summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-12 00:15:42 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-12 00:15:42 +0000
commit5e4de2a2656607feaa38aedfbaf705d1a9a8c6a6 (patch)
tree8d6da57ff2a4ef0dafca3f5d79a785df21b317a9 /lib
parent65bfe20244dad2fc582ee1b5d20137f8083ae5e0 (diff)
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb2
-rw-r--r--lib/rubygems/package/tar_input.rb9
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index eda59ef725..8a7bfea551 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -118,7 +118,7 @@ require "rubygems/deprecate"
# -The RubyGems Team
module Gem
- VERSION = '1.8.7'
+ VERSION = '1.8.8'
##
# Raised when RubyGems is unable to load or activate a gem. Contains the
diff --git a/lib/rubygems/package/tar_input.rb b/lib/rubygems/package/tar_input.rb
index 26b4e81ead..5ac93ff336 100644
--- a/lib/rubygems/package/tar_input.rb
+++ b/lib/rubygems/package/tar_input.rb
@@ -49,8 +49,13 @@ class Gem::Package::TarInput
sio.rewind
end
- # TODO use Gem.gunzip
- gzis = Zlib::GzipReader.new(sio || entry)
+ # Ruby 1.8 doesn't have encoding and YAML is UTF-8
+ 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
@metadata = load_gemspec(gzis)
has_meta = true