#!/usr/bin/ruby -w # # Sorted words # "Learn to Program" by Chris Pine, p. 63 # a = [] s = gets.chomp while s != '' a.push(s) s = gets.chomp end puts a.sort