Philipp Huber wrote:
> thanks a lot, works exactly as i wanted :)

Two remarks:

 - did you test this with an empty queue (I guess in that case @root will
be empty so you'll likely need something like

n = @root
while n
  yield n.element
  n = n.next
end

 - by convention #each returns self which wasn't show in Brian's example.

Kind regards

    robert