Alan Chen ruby-talk(44336)
Well, you use a Array push and shift. If you want this behavior could be coded as:
class Simple_FIFO
  def initialize
    @data = Array.new
  end
  def push(val)
    @data.push(val)
  end
  def pop(val)
    @data.shift(val)
  end
endError handling is left as an excercise to the reader :) - alan
