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

* lib/rubygems: Update to RubyGems 2.2.2. Complete history at:

http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2014-02-05 22:18:25 +00:00
parent 62d37fb7db
commit b9a4cf2aca
6 changed files with 44 additions and 24 deletions

View file

@ -1,3 +1,11 @@
Thu Feb 6 07:18:01 2014 Eric Hodel <drbrain@segment7.net>
* lib/rubygems: Update to RubyGems 2.2.2. Complete history at:
http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05
* test/rubygems: ditto.
Wed Feb 5 20:56:32 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Feb 5 20:56:32 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c (to_be_skipped_id): ignore anonymous attributes. * marshal.c (to_be_skipped_id): ignore anonymous attributes.

View file

@ -8,7 +8,7 @@
require 'rbconfig' require 'rbconfig'
module Gem module Gem
VERSION = '2.2.1' VERSION = '2.2.2'
end end
# Must be first since it unloads the prelude from 1.9.2 # Must be first since it unloads the prelude from 1.9.2

View file

@ -240,6 +240,28 @@ class Gem::Specification < Gem::BasicSpecification
attr_reader :summary attr_reader :summary
##
# Singular writer for #authors
#
# Usage:
#
# spec.author = 'John Jones'
def author= o
self.authors = [o]
end
##
# Sets the list of authors, ensuring it is an array.
#
# Usage:
#
# spec.authors = ['John Jones', 'Mary Smith']
def authors= value
@authors = Array(value).flatten.grep(String)
end
## ##
# The platform this gem runs on. # The platform this gem runs on.
# #
@ -442,28 +464,6 @@ class Gem::Specification < Gem::BasicSpecification
add_dependency_with_type(gem, :runtime, *requirements) add_dependency_with_type(gem, :runtime, *requirements)
end end
##
# Singular writer for #authors
#
# Usage:
#
# spec.author = 'John Jones'
def author= o
self.authors = [o]
end
##
# Sets the list of authors, ensuring it is an array.
#
# Usage:
#
# spec.authors = ['John Jones', 'Mary Smith']
def authors= value
@authors = Array(value).flatten.grep(String)
end
## ##
# Executables included in the gem. # Executables included in the gem.
# #

View file

@ -189,6 +189,8 @@ class Gem::Version
@@all = {} @@all = {}
def self.new version # :nodoc: def self.new version # :nodoc:
return super unless Gem::VERSION == self.class
@@all[version] ||= super @@all[version] ||= super
end end

View file

@ -2948,9 +2948,9 @@ end
def with_syck def with_syck
begin begin
verbose, $VERBOSE = $VERBOSE, nil
require "yaml" require "yaml"
old_engine = YAML::ENGINE.yamler old_engine = YAML::ENGINE.yamler
verbose, $VERBOSE = $VERBOSE, nil
YAML::ENGINE.yamler = 'syck' YAML::ENGINE.yamler = 'syck'
load 'rubygems/syck_hack.rb' load 'rubygems/syck_hack.rb'
rescue NameError rescue NameError

View file

@ -3,6 +3,9 @@ require "rubygems/version"
class TestGemVersion < Gem::TestCase class TestGemVersion < Gem::TestCase
class V < ::Gem::Version
end
def test_bump def test_bump
assert_bumped_version_equal "5.3", "5.2.4" assert_bumped_version_equal "5.3", "5.2.4"
end end
@ -37,6 +40,13 @@ class TestGemVersion < Gem::TestCase
assert_equal v('1.1'), Gem::Version.create(ver) assert_equal v('1.1'), Gem::Version.create(ver)
end end
def test_class_new_subclass
v1 = Gem::Version.new '1'
v2 = V.new '1'
refute_same v1, v2
end
def test_eql_eh def test_eql_eh
assert_version_eql "1.2", "1.2" assert_version_eql "1.2", "1.2"
refute_version_eql "1.2", "1.2.0" refute_version_eql "1.2", "1.2.0"