Advent of Code 2020: Day 9 (Ruby solution)