From 397b648dc3a73a53793ea85fcfe0667dd1342f66 Mon Sep 17 00:00:00 2001 From: Gavin Laking Date: Sat, 21 May 2016 19:11:56 +0100 Subject: [PATCH] Remove additional Array instantiation for each line being cleared; Work relating to #364. --- lib/vedeu/interfaces/clear_content.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/vedeu/interfaces/clear_content.rb b/lib/vedeu/interfaces/clear_content.rb index af62a6b03..054c45571 100644 --- a/lib/vedeu/interfaces/clear_content.rb +++ b/lib/vedeu/interfaces/clear_content.rb @@ -77,11 +77,9 @@ def interface def optimised_output Vedeu.timer("Optimised clearing content: '#{name}'") do Array.new(bordered_height) do |iy| - [ - Vedeu::Geometries::Position.new(by + iy, bx), - colour.to_s, - chars, - ].join + Vedeu::Geometries::Position.new(by + iy, bx).to_s + + colour.to_s + + chars end.join + Vedeu::Geometries::Position.new(by, bx) end end