Permalink
Browse files

Merge pull request #8 from ermolaev/master

performance improvement pg_copy_to_string - change the way concat string
  • Loading branch information...
2 parents ad0f0f3 + 507672a commit 66c159d7c64d7b2d3d64aec3ad054354b46af15a @diogob committed Apr 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/postgres-copy/active_record.rb
@@ -24,7 +24,7 @@ def self.pg_copy_to path = nil, options = {}
# Copy all data to a single string
def self.pg_copy_to_string options = {}
data = ''
- self.pg_copy_to(nil, options){|l| data += l }
+ self.pg_copy_to(nil, options){|l| data << l }
if options[:format] == :binary
data.force_encoding("ASCII-8BIT")
end

0 comments on commit 66c159d

Please sign in to comment.