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

ruby-changes:42344

From: naruse <ko1@a...>
Date: Wed, 30 Mar 2016 01:32:46 +0900 (JST)
Subject: [ruby-changes:42344] naruse:r54418 (ruby_2_3): merge revision(s) 54137, 54184: [Backport #12227]

naruse	2016-03-30 01:32:38 +0900 (Wed, 30 Mar 2016)

  New Revision: 54418

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54418

  Log:
    merge revision(s) 54137,54184: [Backport #12227]
    
    * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values
      are the same only when both or neither of the Time objects are in
      summer time (daylight-saving time).
    
    * test/-ext-/time/test_new.rb (test_timespec_new): change a gmtoff
      test to a better one that does not depend on whether the current
      time is in summer time or not.

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/test/-ext-/time/test_new.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 54417)
+++ ruby_2_3/version.h	(revision 54418)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.0"
 #define RUBY_RELEASE_DATE "2016-03-30"
-#define RUBY_PATCHLEVEL 66
+#define RUBY_PATCHLEVEL 67
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_3/test/-ext-/time/test_new.rb
===================================================================
--- ruby_2_3/test/-ext-/time/test_new.rb	(revision 54417)
+++ ruby_2_3/test/-ext-/time/test_new.rb	(revision 54418)
@@ -23,7 +23,11 @@ class  Bug::Time::Test_New < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/-ext-/time/test_new.rb#L23
     assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0).utc?)
     assert_equal(true,  Bug::Time.timespec_new(1447087832, 476451125, 0x7ffffffe).utc?)
     assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).utc?)
-    assert_equal(Time.now.gmtoff, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff)
+    # Cannot compare Time.now.gmtoff with
+    # Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff, because
+    # it depends on whether the current time is in summer time (daylight-saving time) or not.
+    t = Time.now
+    assert_equal(t.gmtoff, Bug::Time.timespec_new(t.tv_sec, t.tv_nsec, 0x7fffffff).gmtoff)
     assert_time_equal(Time.at(1447087832, 476451.125).localtime(86399),
                  Bug::Time.timespec_new(1447087832, 476451125, 86399))
     assert_time_equal(Time.at(1447087832, 476451.125).localtime(-86399),
Index: ruby_2_3/ChangeLog
===================================================================
--- ruby_2_3/ChangeLog	(revision 54417)
+++ ruby_2_3/ChangeLog	(revision 54418)
@@ -1,3 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1
+Wed Mar 30 01:32:14 2016  Rei Odaira  <Rei.Odaira@g...>
+
+	* test/-ext-/time/test_new.rb (test_timespec_new): change a gmtoff
+	  test to a better one that does not depend on whether the current
+	  time is in summer time or not.
+
+Wed Mar 30 01:32:14 2016  Rei Odaira  <Rei.Odaira@g...>
+
+	* test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values
+	  are the same only when both or neither of the Time objects are in
+	  summer time (daylight-saving time).
+
 Wed Mar 30 01:30:54 2016  Hiroshi Shirosaki  <h.shirosaki@g...>
 
 	* lib/rubygems/test_case.rb: Fix test on Windows for inconsistent temp path.

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r54137,54184


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

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