@@ -107,7 +107,7 @@ def say_status(status, message, log_status = true)
107107 status = set_color status , color , true if color
108108
109109 buffer = "#{ status } #{ spaces } #{ message } "
110- buffer << " \n " unless buffer . end_with? ( "\n " )
110+ buffer = " #{ buffer } \n " unless buffer . end_with? ( "\n " )
111111
112112 stdout . print ( buffer )
113113 stdout . flush
@@ -162,7 +162,7 @@ def print_table(array, options = {}) # rubocop:disable MethodLength
162162 colwidth = options [ :colwidth ]
163163 options [ :truncate ] = terminal_width if options [ :truncate ] == true
164164
165- formats << "%-#{ colwidth + 2 } s" if colwidth
165+ formats << "%-#{ colwidth + 2 } s" . dup if colwidth
166166 start = colwidth ? 1 : 0
167167
168168 colcount = array . max { |a , b | a . size <=> b . size } . size
@@ -174,17 +174,17 @@ def print_table(array, options = {}) # rubocop:disable MethodLength
174174 maximas << maxima
175175 formats << if index == colcount - 1
176176 # Don't output 2 trailing spaces when printing the last column
177- "%-s"
177+ "%-s" . dup
178178 else
179- "%-#{ maxima + 2 } s"
179+ "%-#{ maxima + 2 } s" . dup
180180 end
181181 end
182182
183183 formats [ 0 ] = formats [ 0 ] . insert ( 0 , " " * indent )
184184 formats << "%s"
185185
186186 array . each do |row |
187- sentence = ""
187+ sentence = "" . dup
188188
189189 row . each_with_index do |column , index |
190190 maxima = maximas [ index ]
@@ -412,7 +412,7 @@ def ask_simply(statement, color, options)
412412
413413 return unless result
414414
415- result . strip!
415+ result = result . strip
416416
417417 if default && result == ""
418418 default
0 commit comments