るりまサーチ

最速Rubyリファレンスマニュアル検索!
1610件ヒット [1601-1610件を表示] (0.059秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 15 16 17 >>

Array#cycle(n=nil) -> Enumerator (9015.0)

配列の全要素を n 回(nilの場合は無限に)繰り返しブロックを呼びだします。

...黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a = ["a", "b", "c"]
a.cycle {|x| puts x } # print, a, b, c, a, b, c,.. forever.
//}...

Array#minmax -> [object, object] (9015.0)

自身の各要素のうち最小の要素と最大の要素を 要素とするサイズ 2 の配列を返します。

...式では、要素同士の比較をブロックを用いて行います。

//emlist[例][ruby]{
a = %w(albatross dog horse)
a.minmax #=> ["albatross", "horse"]
a.minmax{|a,b| a.length <=> b.length } #=> ["dog", "albatross"]
[].minmax # => [nil, nil]
//}

@see Enum...
<< < ... 15 16 17 >>