A simple LIFO exercise in Ruby.