mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
* backport r33074 from trunk
* lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue in creating ruby-format gemspecs. Fixes Gem.dir not being at the front of Gem.path to fix uninstall and cleanup commands. Fixes gem uninstall stopping on the first missing gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
322937ff00
commit
f5c8aecebc
12 changed files with 208 additions and 76 deletions
|
@ -1459,7 +1459,7 @@ class Gem::Specification
|
|||
# TODO: do we need these?? Kill it
|
||||
glob = File.join(self.lib_dirs_glob, glob)
|
||||
|
||||
Dir[glob].map { |f| f.untaint } # FIX our tests are brokey, run w/ SAFE=1
|
||||
Dir[glob].map { |f| f.untaint } # FIX our tests are broken, run w/ SAFE=1
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -1690,11 +1690,11 @@ class Gem::Specification
|
|||
|
||||
def ruby_code(obj)
|
||||
case obj
|
||||
when String then '%q{' + obj + '}'
|
||||
when String then obj.dump
|
||||
when Array then '[' + obj.map { |x| ruby_code x }.join(", ") + ']'
|
||||
when Gem::Version then obj.to_s.inspect
|
||||
when Date then '%q{' + obj.strftime('%Y-%m-%d') + '}'
|
||||
when Time then '%q{' + obj.strftime('%Y-%m-%d') + '}'
|
||||
when Gem::Version then obj.to_s.dump
|
||||
when Date then obj.strftime('%Y-%m-%d').dump
|
||||
when Time then obj.strftime('%Y-%m-%d').dump
|
||||
when Numeric then obj.inspect
|
||||
when true, false, nil then obj.inspect
|
||||
when Gem::Platform then "Gem::Platform.new(#{obj.to_a.inspect})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue