diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/rubygems.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 44 | ||||
-rw-r--r-- | lib/rubygems/version.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_version.rb | 10 |
6 files changed, 44 insertions, 24 deletions
@@ -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> * marshal.c (to_be_skipped_id): ignore anonymous attributes. diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 7afc85bda5..456273ed19 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -8,7 +8,7 @@ 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 diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index e98f3284cd..f4e609a5eb 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -241,6 +241,28 @@ class Gem::Specification < Gem::BasicSpecification 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::BasicSpecification 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’t specify the diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb index 28b2e09701..20663326ef 100644 --- a/lib/rubygems/version.rb +++ b/lib/rubygems/version.rb @@ -189,6 +189,8 @@ class Gem::Version @@all = {} def self.new version # :nodoc: + return super unless Gem::VERSION == self.class + @@all[version] ||= super end diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index cd2a5aba3b..1afb5ba247 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -2948,9 +2948,9 @@ end 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 diff --git a/test/rubygems/test_gem_version.rb b/test/rubygems/test_gem_version.rb index e0499fe73f..5a65b5c9c7 100644 --- a/test/rubygems/test_gem_version.rb +++ b/test/rubygems/test_gem_version.rb @@ -3,6 +3,9 @@ require "rubygems/version" 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 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" |