class Magick::Image::View::Rows

def each

iterator called from subscript methods
def each
  maxrows = @height - 1
  maxcols = @width - 1
  @rows.each do |j|
    Kernel.raise IndexError, "index [#{j}] out of range" if j > maxrows
    @cols.each do |i|
      Kernel.raise IndexError, "index [#{i}] out of range" if i > maxcols
      yield j * @width + i
    end
  end
  nil # useless return value
end