るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

検索結果

Enumerable#compact -> Array (24220.0)

self から nil を取り除いた配列を生成して返します。

...self から nil を取り除いた配列を生成して返します。

//emlist[][ruby]{
def with_nils
yield 1
yield 2
yield nil
yield 3
end

t
o_enum(:with_nils).compact # => [1, 2, 3]
//}

@see Array#compact...