lib/tl1/command.rb in tl1-0.1.0 vs lib/tl1/command.rb in tl1-0.2.0

- old
+ new

@@ -1,6 +1,7 @@ # frozen_string_literal: true + require 'strscan' module TL1 # A representation of a CLI interaction, including an input message format and # an output message format. @@ -73,11 +74,11 @@ yield scanner.getch end end def scan_record(scanner) - record = String.new + record = +'' scan_characters(scanner) do |char| case char when '\\' next_char = scanner.getch @@ -93,10 +94,10 @@ end end end def scan_record_quoted_string(scanner) - record = String.new + record = +'' scan_characters(scanner) do |char| case char when '\\' next_char = scanner.getch