From: Robert Klemme Date: 2005-09-01T18:41:24+09:00 Subject: Re: implementing the "each" method for own classes 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