diff --git a/2019/day5/intcode.rb b/2019/day5/intcode.rb index f1a72b3..d9114ee 100644 --- a/2019/day5/intcode.rb +++ b/2019/day5/intcode.rb @@ -6,10 +6,12 @@ module Intcode end def self.parse(input) - cleaned = input - .gsub(/^#.*$/, '') - .gsub('\s', '') - Program.new cleaned.split(',').map(&:to_i) + parsed = input + .gsub(/^#.*$/, '') + .gsub('\s', '') + .split(',') + .map(&:to_i) + Program.new parsed end class Memory < Array