When you call #strip!, line gets mutated in place, so adding it to another list is unecessary. This can be written simply: `data.lines.map(&:strip).sort`