lib/ftpd/telnet.rb in ftpd-1.1.1 vs lib/ftpd/telnet.rb in ftpd-2.0.0

- old
+ new

@@ -1,6 +1,7 @@ # -*- ruby encoding: us-ascii -*- +# frozen_string_literal: true module Ftpd # Handle the limited processing of Telnet sequences required by the # FTP RFCs. @@ -95,11 +96,11 @@ ] # Parse the the command. Sets @plain and @reply def parse_command(command) - @plain = '' - @reply = '' + @plain = ''.dup + @reply = ''.dup scanner = StringScanner.new(command) while !scanner.eos? SEQUENCES.each do |regexp, method| if scanner.scan(regexp) send method, scanner