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

ruby-changes:33720

From: akr <ko1@a...>
Date: Sun, 4 May 2014 03:27:27 +0900 (JST)
Subject: [ruby-changes:33720] akr:r45801 (trunk): * lib/time.rb (Time.make_time): Refactored.

akr	2014-05-04 03:27:21 +0900 (Sun, 04 May 2014)

  New Revision: 45801

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

  Log:
    * lib/time.rb (Time.make_time): Refactored.

  Modified files:
    trunk/ChangeLog
    trunk/lib/time.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45800)
+++ ChangeLog	(revision 45801)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun May  4 03:26:39 2014  Tanaka Akira  <akr@f...>
+
+	* lib/time.rb (Time.make_time): Refactored.
+
 Sun May  4 02:53:17 2014  Tanaka Akira  <akr@f...>
 
 	* lib/time.rb (Time.rfc2822): Fix year completion.
Index: lib/time.rb
===================================================================
--- lib/time.rb	(revision 45800)
+++ lib/time.rb	(revision 45801)
@@ -258,11 +258,7 @@ class Time https://github.com/ruby/ruby/blob/trunk/lib/time.rb#L258
         year, mon, day, hour, min, sec =
           apply_offset(year, mon, day, hour, min, sec, off)
         t = self.utc(year, mon, day, hour, min, sec, usec)
-        if zone_utc?(zone)
-          t.utc
-        else
-          t.localtime(off)
-        end
+        t.localtime(off) if !zone_utc?(zone)
         t
       else
         self.local(year, mon, day, hour, min, sec, usec)

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

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