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

ruby-changes:40494

From: akr <ko1@a...>
Date: Sat, 14 Nov 2015 21:45:41 +0900 (JST)
Subject: [ruby-changes:40494] akr:r52575 (trunk): * lib/time.rb: Use "<<" to reduce string allocation.

akr	2015-11-14 21:45:30 +0900 (Sat, 14 Nov 2015)

  New Revision: 52575

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

  Log:
    * lib/time.rb: Use "<<" to reduce string allocation.

  Modified files:
    trunk/ChangeLog
    trunk/lib/time.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52574)
+++ ChangeLog	(revision 52575)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Nov 14 21:44:56 2015  Tanaka Akira  <akr@f...>
+
+	* lib/time.rb: Use "<<" to reduce string allocation.
+
 Sat Nov 14 17:45:49 2015  Tanaka Akira  <akr@f...>
 
 	* lib/tsort.rb: Specify frozen_string_literal: true.
Index: lib/time.rb
===================================================================
--- lib/time.rb	(revision 52574)
+++ lib/time.rb	(revision 52575)
@@ -616,7 +616,7 @@ class Time https://github.com/ruby/ruby/blob/trunk/lib/time.rb#L616
     sprintf('%s, %02d %s %0*d %02d:%02d:%02d ',
       RFC2822_DAY_NAME[wday],
       day, RFC2822_MONTH_NAME[mon-1], year < 0 ? 5 : 4, year,
-      hour, min, sec) +
+      hour, min, sec) <<
     if utc?
       '-0000'
     else

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

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