るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.053秒)
トップページ > クエリ:IO.new[x] > クエリ:>>[x] > クエリ:eof?[x] > クエリ:exception[x] > クエリ:to_csv[x] > クラス:StopIteration[x]

別のキーワード

  1. _builtin >>
  2. socket msg_eof
  3. irb/input-method readable_atfer_eof?
  4. _builtin eof
  5. _builtin eof?

ライブラリ

検索結果

StopIteration#result -> object (3007.0)

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

...します。

object = 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 #=> :ea...