るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.055秒)
トップページ > クエリ:IO.new[x] > クエリ:>>[x] > クエリ:permute![x] > クエリ:ui=[x] > バージョン:3.1[x] > クエリ:MINOR_VERSION[x] > クラス:StopIteration[x]

別のキーワード

  1. _builtin >>
  2. optparse permute!
  3. optparse permute
  4. getoptlong permute
  5. optionparser permute

ライブラリ

検索結果

StopIteration#result -> object (9022.0)

この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。

...ect = Object.new
def object.each
yield :yield1
yield :yield2
:each_returned
end

enumerator = object.to_enum

p enumerator.next #=> :yield1
p enumerator.next #=> :yield2

begin
enumerator.next
rescue StopIteration => error
p error.result #=> :each_returned
end...