stack data structure in ruby