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

ruby-changes:30575

From: nagachika <ko1@a...>
Date: Fri, 23 Aug 2013 01:19:17 +0900 (JST)
Subject: [ruby-changes:30575] nagachika:r42654 (ruby_2_0_0): merge revision(s) 42100: [Backport #8806]

nagachika	2013-08-23 01:19:07 +0900 (Fri, 23 Aug 2013)

  New Revision: 42654

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

  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_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/ext/date/date_parse.c
    branches/ruby_2_0_0/test/date/test_date_parse.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 42653)
+++ ruby_2_0_0/ChangeLog	(revision 42654)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Fri Aug 23 01:16:00 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
+	  can be omitted.
+
 Fri Aug 23 00:55:02 2013  Tanaka Akira  <akr@f...>
 
 	* gc.c (getrusage_time): Fallback clock_gettime to getrusage when
Index: ruby_2_0_0/ext/date/date_parse.c
===================================================================
--- ruby_2_0_0/ext/date/date_parse.c	(revision 42653)
+++ ruby_2_0_0/ext/date/date_parse.c	(revision 42654)
@@ -2848,7 +2848,9 @@ rfc2822_cb(VALUE m, VALUE hash) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/date/date_parse.c#L2848
 	    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_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 42653)
+++ ruby_2_0_0/version.h	(revision 42654)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-08-23"
-#define RUBY_PATCHLEVEL 296
+#define RUBY_PATCHLEVEL 297
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_0_0/test/date/test_date_parse.rb
===================================================================
--- ruby_2_0_0/test/date/test_date_parse.rb	(revision 42653)
+++ ruby_2_0_0/test/date/test_date_parse.rb	(revision 42654)
@@ -1062,10 +1062,16 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/date/test_date_parse.rb#L1062
     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_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r42100


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

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