1result = STDIN 2 .each_line(chomp: true) 3 .reject(&:empty?) 4 .map do |line| 5 is_label = line.start_with?("<") 6 next "# #{line}" if is_label 7 bytes, description = line.split("\t", 2) 8 "0x#{bytes.split(" ").reverse.join}, # #{description}" 9 end 10 11puts result 12 13