performance improvement pg_copy_to_string - change the way concat string #8

Merged
merged 1 commit into from Apr 4, 2013
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

@@ -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