Method: RubyPython::PyEnumerable#each

Defined in:
lib/rubypython/rubypyproxy.rb

#eachObject



317
318
319
320
321
322
323
324
325
326
# File 'lib/rubypython/rubypyproxy.rb', line 317

def each
  iter = self.__iter__
  loop do
    begin
      yield iter.next
    rescue RubyPython::PythonError => exc
      return if exc.message =~ /StopIteration/
    end
  end
end