implement Stack class with an Array in Ruby