From 2a70161abe24ae130041aaca3eec79e63d08a5f5 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 25 May 2023 14:17:12 +0200 Subject: Fix StringConcatenation offenses (non-production) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prefer interpolation over concatenation ``` Comparison ("String#{'String'}" vs 'String' + 'String'): interpolation: 11821321.0 i/s concatenation: 8849491.7 i/s - 1.34x (± 0.00) slower ``` --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 8125959f..28712c0d 100644 --- a/Rakefile +++ b/Rakefile @@ -1,13 +1,13 @@ # frozen_string_literal: true -require File.expand_path(File.dirname(__FILE__) + '/lib/axlsx/version.rb') +require File.expand_path("#{File.dirname(__FILE__)}/lib/axlsx/version.rb") task build: :gendoc do system "gem build axlsx.gemspec" end task :benchmark do - require File.expand_path(File.dirname(__FILE__) + '/test/benchmark.rb') + require File.expand_path("#{File.dirname(__FILE__)}/test/benchmark.rb") end task :gendoc do -- cgit v1.2.3