種類
- インスタンスメソッド (86)
- 特異メソッド (32)
- 文書 (24)
- クラス (4)
ライブラリ
- ビルトイン (86)
-
rexml
/ document (24) -
rubygems
/ indexer (12)
クラス
- Array (24)
-
Enumerator
:: Lazy (16) -
Gem
:: Indexer (12) - Hash (18)
-
REXML
:: Formatters :: Pretty (24)
モジュール
- Enumerable (4)
- GC (20)
キーワード
- Lazy (4)
-
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) -
auto
_ compact (4) -
auto
_ compact= (4) - compact! (21)
- compact= (12)
-
compact
_ specs (12) - new (12)
-
verify
_ compaction _ references (6)
検索結果
先頭5件
-
Hash
# compact -> Hash (18158.0) -
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
...
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
hash = {a: 1......, b: nil, c: 3}
p hash.compact #=> {:a=>1, :c=>3}
p hash #=> {:a=>1, :b=>nil, :c=>3}
hash.compact!
hash #=> {:a=>1, :c=>3}
p hash.compact! #=> nil
//}
@see Array#compact... -
Array
# compact -> Array (18152.0) -
compact は自身から nil を取り除いた配列を生成して返します。 compact! は自身から破壊的に nil を取り除き、変更が 行われた場合は self を、そうでなければ nil を返します。
...
compact は自身から nil を取り除いた配列を生成して返します。
compact! は自身から破壊的に nil を取り除き、変更が
行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
ary = [1, nil, 2, nil, 3, nil]
p ary.compact......#=> [1, 2, 3]
p ary #=> [1, nil, 2, nil, 3, nil]
ary.compact!
p ary #=> [1, 2, 3]
p ary.compact! #=> nil
//}... -
Enumerator
:: Lazy # compact -> Enumerator :: Lazy (18117.0) -
Enumerable#compact と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#compact と同じですが、配列ではなく Enumerator::Lazy を返します。... -
Enumerable
# compact -> Array (18113.0) -
self から nil を取り除いた配列を生成して返します。
...self から nil を取り除いた配列を生成して返します。
//emlist[][ruby]{
def with_nils
yield 1
yield 2
yield nil
yield 3
end
to_enum(:with_nils).compact # => [1, 2, 3]
//}
@see Array#compact... -
REXML
:: Formatters :: Pretty # compact -> bool (18107.0) -
出力をコンパクトにするかどうかを返します。
...出力をコンパクトにするかどうかを返します。
これが真の場合、出力の空白をできる限り削除しようとします。
デフォルト値は false です。
@see REXML::Formatters::Pretty#compact=... -
GC
. compact -> Hash (18101.0) -
ヒープをコンパクションします。
...ヒープをコンパクションします。
詳細は15626を参照してください。
@see GC.verify_compaction_references... -
Hash
# compact! -> self | nil (6158.0) -
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
...
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
hash = {a: 1......, b: nil, c: 3}
p hash.compact #=> {:a=>1, :c=>3}
p hash #=> {:a=>1, :b=>nil, :c=>3}
hash.compact!
hash #=> {:a=>1, :c=>3}
p hash.compact! #=> nil
//}
@see Array#compact... -
Array
# compact! -> self | nil (6152.0) -
compact は自身から nil を取り除いた配列を生成して返します。 compact! は自身から破壊的に nil を取り除き、変更が 行われた場合は self を、そうでなければ nil を返します。
...
compact は自身から nil を取り除いた配列を生成して返します。
compact! は自身から破壊的に nil を取り除き、変更が
行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
ary = [1, nil, 2, nil, 3, nil]
p ary.compact......#=> [1, 2, 3]
p ary #=> [1, nil, 2, nil, 3, nil]
ary.compact!
p ary #=> [1, 2, 3]
p ary.compact! #=> nil
//}... -
GC
. auto _ compact=(bool) (6129.0) -
GC.compact をフルGCで行うかどうかを制御します。
...GC.compact をフルGCで行うかどうかを制御します。
true を設定するとフルGCのタイミングででヒープをコンパクションします。
この機能を有効にするとフルGCのパフォーマンスが低下します。
デフォルトは false です。
詳細......は17176を参照してください。
@param bool フルGCでコンパクションするかどうかを true か false で設定します。
@see GC.compact GC.auto_compact... -
GC
. verify _ compaction _ references(toward: nil , double _ heap: nil) -> Hash (6112.0) -
コンパクションの参照の一貫性を検証します。
...ークスタックにプッシュされて、
SEGV が起きるでしょう。
@param toward nil か :empty を指定します。
@param double_heap ヒープサイズを2倍にするかどうかを真偽値で指定します。
@return GC.compact の返り値と同じです。
@see GC.compact... -
GC
. auto _ compact -> bool (6107.0) -
auto compaction が有効化どうかを返します。
...auto compaction が有効化どうかを返します。
@return auto compaction が有効な場合 true を返します。
そうでなければ false を返します。
@see GC.auto_compact=... -
REXML
:: Formatters :: Pretty # compact=(c) (6107.0) -
出力をコンパクトにするかどうかを設定します。
...出力をコンパクトにするかどうかを設定します。
@param c コンパクトな出力をするかどうかを指定します。
@see REXML::Formatters::Pretty#compact... -
Gem
:: Indexer # compact _ specs(specs) -> Array (6101.0) -
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して 返します。
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して
返します。
@param specs Gem::Specification の配列を指定します。