Simple stack implementation in ruby