ruby-changes:32772
From: drbrain <ko1@a...>
Date: Thu, 6 Feb 2014 07:18:32 +0900 (JST)
Subject: [ruby-changes:32772] drbrain:r44851 (trunk): * lib/rubygems: Update to RubyGems 2.2.2. Complete history at:
drbrain 2014-02-06 07:18:25 +0900 (Thu, 06 Feb 2014) New Revision: 44851 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44851 Log: * 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. Modified files: trunk/ChangeLog trunk/lib/rubygems/specification.rb trunk/lib/rubygems/version.rb trunk/lib/rubygems.rb trunk/test/rubygems/test_gem_specification.rb trunk/test/rubygems/test_gem_version.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 44850) +++ ChangeLog (revision 44851) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Feb 6 07:18:01 2014 Eric Hodel <drbrain@s...> + + * 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@r...> * marshal.c (to_be_skipped_id): ignore anonymous attributes. Index: lib/rubygems/specification.rb =================================================================== --- lib/rubygems/specification.rb (revision 44850) +++ lib/rubygems/specification.rb (revision 44851) @@ -241,6 +241,28 @@ class Gem::Specification < Gem::BasicSpe https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L241 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. # # This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT. @@ -443,28 +465,6 @@ class Gem::Specification < Gem::BasicSpe https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L465 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. # # For example, the rake gem has rake as an executable. You don specify the Index: lib/rubygems/version.rb =================================================================== --- lib/rubygems/version.rb (revision 44850) +++ lib/rubygems/version.rb (revision 44851) @@ -189,6 +189,8 @@ class Gem::Version https://github.com/ruby/ruby/blob/trunk/lib/rubygems/version.rb#L189 @@all = {} def self.new version # :nodoc: + return super unless Gem::VERSION == self.class + @@all[version] ||= super end Index: lib/rubygems.rb =================================================================== --- lib/rubygems.rb (revision 44850) +++ lib/rubygems.rb (revision 44851) @@ -8,7 +8,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L8 require 'rbconfig' module Gem - VERSION = '2.2.1' + VERSION = '2.2.2' end # Must be first since it unloads the prelude from 1.9.2 Index: test/rubygems/test_gem_specification.rb =================================================================== --- test/rubygems/test_gem_specification.rb (revision 44850) +++ test/rubygems/test_gem_specification.rb (revision 44851) @@ -2948,9 +2948,9 @@ end https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L2948 def with_syck begin + verbose, $VERBOSE = $VERBOSE, nil require "yaml" old_engine = YAML::ENGINE.yamler - verbose, $VERBOSE = $VERBOSE, nil YAML::ENGINE.yamler = 'syck' load 'rubygems/syck_hack.rb' rescue NameError Index: test/rubygems/test_gem_version.rb =================================================================== --- test/rubygems/test_gem_version.rb (revision 44850) +++ test/rubygems/test_gem_version.rb (revision 44851) @@ -3,6 +3,9 @@ require "rubygems/version" https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_version.rb#L3 class TestGemVersion < Gem::TestCase + class V < ::Gem::Version + end + def test_bump assert_bumped_version_equal "5.3", "5.2.4" end @@ -37,6 +40,13 @@ class TestGemVersion < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_version.rb#L40 assert_equal v('1.1'), Gem::Version.create(ver) end + def test_class_new_subclass + v1 = Gem::Version.new '1' + v2 = V.new '1' + + refute_same v1, v2 + end + def test_eql_eh assert_version_eql "1.2", "1.2" refute_version_eql "1.2", "1.2.0" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/