るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.028秒)
トップページ > クエリ:object[x] > クエリ:>[x] > クエリ:feed[x]

別のキーワード

  1. objectspace each_object
  2. _builtin each_object
  3. object send
  4. object to_enum
  5. object enum_for

ライブラリ

クラス

検索結果

Enumerator#feed(obj) -> nil (18213.0)

Enumerator 内部の yield が返す値を設定します。

...o = Object.new
def o.each
x = yield # (2) blocks
p x # (5) => "foo"
x = yield # (6) blocks
p x # (8) => nil
x = yield # (9) blocks
p x # not reached w/o another e.next
end

e = o.to_enum
e.next # (1)
e.feed "f...