[ruby-core:82869] [Ruby trunk Bug#11310][Closed] CSV::Table#to_csv should use concat not +

From: hsbt@...
Date: 2017-09-19 08:52:19 UTC
List: ruby-core #82869
Issue #11310 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Assigned to Closed
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONTNEED

applied at r59657

----------------------------------------
Bug #11310: CSV::Table#to_csv should use concat not +
https://bugs.ruby-lang.org/issues/11310#change-66769

* Author: zdennis (Zach Dennis)
* Status: Closed
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
* Backport: 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONTNEED
----------------------------------------
The current implementation of CSV::Table#to_a method uses Array#+ to which is really bad on performance. It seems like it should use Array#concat.

Relevant Github PR: https://github.com/ruby/ruby/pull/946



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next