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

ruby-changes:16238

From: shyouhei <ko1@a...>
Date: Tue, 8 Jun 2010 13:46:01 +0900 (JST)
Subject: [ruby-changes:16238] Ruby:r28204 (ruby_1_8_7): merge revision(s) 27014:

shyouhei	2010-06-08 13:45:42 +0900 (Tue, 08 Jun 2010)

  New Revision: 28204

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

  Log:
    merge revision(s) 27014:
    * lib/date.rb (Date#>>): fixed.  [ruby-core:28011]

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/lib/date.rb
    branches/ruby_1_8_7/version.h

Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 28203)
+++ ruby_1_8_7/ChangeLog	(revision 28204)
@@ -1,3 +1,7 @@
+Tue Jun  8 13:40:04 2010  Tadayoshi Funaba  <tadf@d...>
+
+	* lib/date.rb (Date#>>): fixed.  [ruby-core:28011]
+
 Tue Jun  8 12:37:56 2010  NARUSE, Yui  <naruse@r...>
 
 	* io.c, eval.c, process.c: add linux to r26371's condition.
Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 28203)
+++ ruby_1_8_7/version.h	(revision 28204)
@@ -2,7 +2,7 @@
 #define RUBY_RELEASE_DATE "2010-06-08"
 #define RUBY_VERSION_CODE 187
 #define RUBY_RELEASE_CODE 20100608
-#define RUBY_PATCHLEVEL 269
+#define RUBY_PATCHLEVEL 270
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
Index: ruby_1_8_7/lib/date.rb
===================================================================
--- ruby_1_8_7/lib/date.rb	(revision 28203)
+++ ruby_1_8_7/lib/date.rb	(revision 28204)
@@ -1,7 +1,7 @@
 #
 # date.rb - date and time library
 #
-# Author: Tadayoshi Funaba 1998-2008
+# Author: Tadayoshi Funaba 1998-2010
 #
 # Documentation: William Webber <william@w...>
 #
@@ -1305,7 +1305,10 @@
     y, m = (year * 12 + (mon - 1) + n).divmod(12)
     m,   = (m + 1)                    .divmod(1)
     d = mday
-    d -= 1 until jd2 = self.class.valid_civil?(y, m, d, fix_style)
+    until jd2 = self.class.valid_civil?(y, m, d, fix_style)
+      d -= 1
+      raise ArgumentError, 'invalid date' unless d > 0
+    end
     self + (jd2 - jd)
   end
 

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

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