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

ruby-changes:30695

From: usa <ko1@a...>
Date: Mon, 2 Sep 2013 17:22:06 +0900 (JST)
Subject: [ruby-changes:30695] usa:r42774 (ruby_1_9_3): merge revision(s) 42100: [Backport #8806]

usa	2013-09-02 17:21:58 +0900 (Mon, 02 Sep 2013)

  New Revision: 42774

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

  Log:
    merge revision(s) 42100: [Backport #8806]
    
    * ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
      can be omitted.

  Modified directories:
    branches/ruby_1_9_3/
  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/ext/date/date_parse.c
    branches/ruby_1_9_3/test/date/test_date_parse.rb
    branches/ruby_1_9_3/version.h
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 42773)
+++ ruby_1_9_3/ChangeLog	(revision 42774)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1
+Mon Sep  2 17:21:47 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
+	  can be omitted.
+
 Mon Aug 19 18:36:37 2013  NAKAMURA Usaku  <usa@r...>
 
 	* test/webrick/test_cgi.rb (TestWEBrickCGI#{start_cgi_server,test_cgi}):
Index: ruby_1_9_3/ext/date/date_parse.c
===================================================================
--- ruby_1_9_3/ext/date/date_parse.c	(revision 42773)
+++ ruby_1_9_3/ext/date/date_parse.c	(revision 42774)
@@ -2147,7 +2147,9 @@ rfc2822_cb(VALUE m, VALUE hash) https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ext/date/date_parse.c#L2147
 	    s[i] = rb_reg_nth_match(i, m);
     }
 
-    set_hash("wday", INT2FIX(day_num(s[1])));
+    if (!NIL_P(s[1])) {
+	set_hash("wday", INT2FIX(day_num(s[1])));
+    }
     set_hash("mday", str2num(s[2]));
     set_hash("mon", INT2FIX(mon_num(s[3])));
     y = str2num(s[4]);
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 42773)
+++ ruby_1_9_3/version.h	(revision 42774)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 469
+#define RUBY_PATCHLEVEL 470
 
-#define RUBY_RELEASE_DATE "2013-08-19"
+#define RUBY_RELEASE_DATE "2013-09-02"
 #define RUBY_RELEASE_YEAR 2013
-#define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 19
+#define RUBY_RELEASE_MONTH 9
+#define RUBY_RELEASE_DAY 2
 
 #include "ruby/version.h"
 
Index: ruby_1_9_3/test/date/test_date_parse.rb
===================================================================
--- ruby_1_9_3/test/date/test_date_parse.rb	(revision 42773)
+++ ruby_1_9_3/test/date/test_date_parse.rb	(revision 42774)
@@ -1028,10 +1028,16 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/date/test_date_parse.rb#L1028
     d = Date.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700', Date::ITALY + 10)
     assert_equal(Date.new(2001,2,3), d)
     assert_equal(Date::ITALY + 10, d.start)
+    d = Date.rfc2822('3 Feb 2001 04:05:06 +0700', Date::ITALY + 10)
+    assert_equal(Date.new(2001,2,3), d)
+    assert_equal(Date::ITALY + 10, d.start)
 
     d = DateTime.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700', Date::ITALY + 10)
     assert_equal(DateTime.new(2001,2,3,4,5,6,'+07:00'), d)
     assert_equal(Date::ITALY + 10, d.start)
+    d = DateTime.rfc2822('3 Feb 2001 04:05:06 +0700', Date::ITALY + 10)
+    assert_equal(DateTime.new(2001,2,3,4,5,6,'+07:00'), d)
+    assert_equal(Date::ITALY + 10, d.start)
   end
 
   def test_httpdate

Property changes on: ruby_1_9_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r42100


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

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