implement queue in ruby