るりまサーチ

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

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. $-l kernel

ライブラリ

モジュール

検索結果

Kernel.#iterator? -> bool (24307.0)

メソッドにブロックが与えられていれば真を返します。

...false を返します。

iterator?
は (ブロックが必ずイテレートするとはいえないので)推奨されていないの
で block_given? を使ってください。

//emlist[例][ruby]{
def check
i
f block_given?
puts "Block is given."
else
puts "Block isn't given."...
...end
end
check{} #=> Block is given.
check #=> Block isn't given.
//}...

Kernel.#block_given? -> bool (12207.0)

メソッドにブロックが与えられていれば真を返します。

...false を返します。

iterator?
は (ブロックが必ずイテレートするとはいえないので)推奨されていないの
で block_given? を使ってください。

//emlist[例][ruby]{
def check
i
f block_given?
puts "Block is given."
else
puts "Block isn't given."...
...end
end
check{} #=> Block is given.
check #=> Block isn't given.
//}...