[前][次][番号順一覧][スレッド一覧]

ruby-changes:32256

From: usa <ko1@a...>
Date: Sun, 22 Dec 2013 13:38:37 +0900 (JST)
Subject: [ruby-changes:32256] usa:r44335 (ruby_1_9_3): * lib/rubygems.rb: 1.8.23.2.

usa	2013-12-22 13:38:28 +0900 (Sun, 22 Dec 2013)

  New Revision: 44335

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44335

  Log:
    * lib/rubygems.rb: 1.8.23.2.
      [ruby-core:58757] [Backport#9193] reported by Jeremy Evans and patched
      by Eric Hodel.

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/lib/rubygems/version.rb
    branches/ruby_1_9_3/lib/rubygems.rb
    branches/ruby_1_9_3/test/rubygems/test_gem_requirement.rb
    branches/ruby_1_9_3/test/rubygems/test_gem_version.rb
    branches/ruby_1_9_3/version.h
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 44334)
+++ ruby_1_9_3/ChangeLog	(revision 44335)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1
+Sun Dec 22 13:35:58 2013  NAKAMURA Usaku  <usa@r...>
+
+	* lib/rubygems.rb: 1.8.23.2.
+	  [ruby-core:58757] [Backport#9193] reported by Jeremy Evans and patched
+	  by Eric Hodel.
+
 Fri Nov 22 12:44:56 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* util.c (ruby_strtod): ignore too long fraction part, which does not
Index: ruby_1_9_3/lib/rubygems/version.rb
===================================================================
--- ruby_1_9_3/lib/rubygems/version.rb	(revision 44334)
+++ ruby_1_9_3/lib/rubygems/version.rb	(revision 44335)
@@ -145,8 +145,8 @@ class Gem::Version https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/rubygems/version.rb#L145
 
   include Comparable
 
-  VERSION_PATTERN = '[0-9]+(\.[0-9a-zA-Z]+)*' # :nodoc:
-  ANCHORED_VERSION_PATTERN = /\A\s*(#{VERSION_PATTERN})*\s*\z/ # :nodoc:
+  VERSION_PATTERN = '[0-9]+(?>\.[0-9a-zA-Z]+)*' # :nodoc:
+  ANCHORED_VERSION_PATTERN = /\A\s*(#{VERSION_PATTERN})?\s*\z/ # :nodoc:
 
   ##
   # A string representation of this Version.
Index: ruby_1_9_3/lib/rubygems.rb
===================================================================
--- ruby_1_9_3/lib/rubygems.rb	(revision 44334)
+++ ruby_1_9_3/lib/rubygems.rb	(revision 44335)
@@ -121,7 +121,7 @@ require "rubygems/deprecate" https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/rubygems.rb#L121
 # -The RubyGems Team
 
 module Gem
-  VERSION = '1.8.23'
+  VERSION = '1.8.23.2'
 
   ##
   # Raised when RubyGems is unable to load or activate a gem.  Contains the
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 44334)
+++ ruby_1_9_3/version.h	(revision 44335)
@@ -1,9 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 484
+#define RUBY_PATCHLEVEL 485
 
-#define RUBY_RELEASE_DATE "2013-11-22"
+#define RUBY_RELEASE_DATE "2013-12-22"
 #define RUBY_RELEASE_YEAR 2013
-#define RUBY_RELEASE_MONTH 11
+#define RUBY_RELEASE_MONTH 12
 #define RUBY_RELEASE_DAY 22
 
 #include "ruby/version.h"
Index: ruby_1_9_3/test/rubygems/test_gem_requirement.rb
===================================================================
--- ruby_1_9_3/test/rubygems/test_gem_requirement.rb	(revision 44334)
+++ ruby_1_9_3/test/rubygems/test_gem_requirement.rb	(revision 44335)
@@ -37,17 +37,19 @@ class TestGemRequirement < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/rubygems/test_gem_requirement.rb#L37
   end
 
   def test_parse_bad
-    e = assert_raises ArgumentError do
-      Gem::Requirement.parse nil
-    end
-
-    assert_equal 'Illformed requirement [nil]', e.message
+    [
+      nil,
+      '',
+      '! 1',
+      '= junk',
+      '1..2',
+    ].each do |bad|
+      e = assert_raises ArgumentError do
+        Gem::Requirement.parse bad
+      end
 
-    e = assert_raises ArgumentError do
-      Gem::Requirement.parse ""
+      assert_equal "Illformed requirement [#{bad.inspect}]", e.message
     end
-
-    assert_equal 'Illformed requirement [""]', e.message
   end
 
   def test_prerelease_eh
Index: ruby_1_9_3/test/rubygems/test_gem_version.rb
===================================================================
--- ruby_1_9_3/test/rubygems/test_gem_version.rb	(revision 44334)
+++ ruby_1_9_3/test/rubygems/test_gem_version.rb	(revision 44335)
@@ -64,12 +64,18 @@ class TestGemVersion < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/rubygems/test_gem_version.rb#L64
   end
 
   def test_initialize_bad
-    ["junk", "1.0\n2.0"].each do |bad|
-      e = assert_raises ArgumentError do
+    %W[
+      junk
+      1.0\n2.0
+      1..2
+      1.2\ 3.4
+      1-2-3
+    ].each do |bad|
+      e = assert_raises ArgumentError, bad do
         Gem::Version.new bad
       end
 
-      assert_equal "Malformed version number string #{bad}", e.message
+      assert_equal "Malformed version number string #{bad}", e.message, bad
     end
   end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]