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

ruby-changes:29899

From: nagachika <ko1@a...>
Date: Sat, 13 Jul 2013 23:48:27 +0900 (JST)
Subject: [ruby-changes:29899] nagachika:r41951 (ruby_2_0_0): merge revision(s) 41871: [Backport #8608]

nagachika	2013-07-13 23:47:56 +0900 (Sat, 13 Jul 2013)

  New Revision: 41951

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

  Log:
    merge revision(s) 41871: [Backport #8608]
    
    * ext/date/date_parse.c (date_zone_to_diff): [ruby-core:55831].

  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 41950)
+++ ruby_2_0_0/ChangeLog	(revision 41951)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sat Jul 13 23:41:25 2013  Tadayoshi Funaba  <tadf@d...>
+
+	* ext/date/date_parse.c (date_zone_to_diff): [ruby-core:55831].
+
 Sat Jul 13 23:34:13 2013  Akinori MUSHA  <knu@i...>
 
 	* object.c: Fix rdoc for Kernel#<=>. [Fix GH-352]
Index: ruby_2_0_0/ext/date/date_parse.c
===================================================================
--- ruby_2_0_0/ext/date/date_parse.c	(revision 41950)
+++ ruby_2_0_0/ext/date/date_parse.c	(revision 41951)
@@ -569,7 +569,7 @@ date_zone_to_diff(VALUE str) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/date/date_parse.c#L569
 			if (cl >= 3)
 			    min  = rb_str_new(&cs[1], 2);
 			if (cl >= 5)
-			    min  = rb_str_new(&cs[3], 2);
+			    sec  = rb_str_new(&cs[3], 2);
 		    }
 		    else {
 			if (cl >= 2)
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 41950)
+++ ruby_2_0_0/version.h	(revision 41951)
@@ -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-07-13"
-#define RUBY_PATCHLEVEL 264
+#define RUBY_PATCHLEVEL 265
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 7
Index: ruby_2_0_0/test/date/test_date_parse.rb
===================================================================
--- ruby_2_0_0/test/date/test_date_parse.rb	(revision 41950)
+++ ruby_2_0_0/test/date/test_date_parse.rb	(revision 41951)
@@ -578,6 +578,15 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/date/test_date_parse.rb#L578
     assert_equal(d2, d1)
   end
 
+  def test__parse_odd_offset
+    h = DateTime._parse('2001-02-03T04:05:06+1')
+    assert_equal(3600, h[:offset])
+    h = DateTime._parse('2001-02-03T04:05:06+123')
+    assert_equal(4980, h[:offset])
+    h = DateTime._parse('2001-02-03T04:05:06+12345')
+    assert_equal(5025, h[:offset])
+  end
+
   require 'time'
 
   def test_parse__time

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r41871


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

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