# File lib/stream.rb, line 377 def at_end? @currentStream.at_end? and begin until streamOfStreams.at_end? dir, @dirOfLastMove = @dirOfLastMove, :forward s = streamOfStreams.basic_forward # if last move was backwards, then @currentStream is # equivalent to s. Move to next stream. next if dir == :backward s.set_to_begin if s.at_end? # empty stream? next # skip it else @currentStream = s return false # found non empty stream end end reachedBoundary # sets @dirOfLastMove and @currentStream end end