Stack Implementation in Ruby