種類
- インスタンスメソッド (86)
- 特異メソッド (32)
- 文書 (13)
- クラス (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 3
. 1 . 0 (4) -
auto
_ compact (4) -
auto
_ compact= (4) - compact! (21)
- compact= (12)
-
compact
_ specs (12) - new (12)
-
verify
_ compaction _ references (6)
検索結果
先頭5件
-
REXML
:: Formatters :: Pretty # compact -> bool (27207.0) -
出力をコンパクトにするかどうかを返します。
...出力をコンパクトにするかどうかを返します。
これが真の場合、出力の空白をできる限り削除しようとします。
デフォルト値は false です。
@see REXML::Formatters::Pretty#compact=... -
Hash
# compact -> Hash (24258.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 (24252.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 (24217.0) -
Enumerable#compact と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#compact と同じですが、配列ではなく Enumerator::Lazy を返します。... -
Enumerable
# compact -> Array (24213.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... -
GC
. compact -> Hash (24201.0) -
ヒープをコンパクションします。
...ヒープをコンパクションします。
詳細は15626を参照してください。
@see GC.verify_compaction_references... -
REXML
:: Formatters :: Pretty # compact=(c) (15207.0) -
出力をコンパクトにするかどうかを設定します。
...出力をコンパクトにするかどうかを設定します。
@param c コンパクトな出力をするかどうかを指定します。
@see REXML::Formatters::Pretty#compact... -
Hash
# compact! -> self | nil (12258.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 (12252.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
. verify _ compaction _ references(toward: nil , double _ heap: nil) -> Hash (12230.0) -
コンパクションの参照の一貫性を検証します。
...処理系依存 (CRuby 特有) です。
コンパクション中に移動されたオブジェクトは T_MOVED オブジェクトに置き換えられます。
コンパクション後には T_MOVED を参照するオブジェクトは存在するべきではありません。
この関数は全......更新して、
それからフルGCを実行します。
もし T_MOVED への参照をもつオブジェクトがあれば、マークスタックにプッシュされて、
SEGV が起きるでしょう。
@param toward nil か :empty を指定します。
@param double_heap ヒープサイズ......を2倍にするかどうかを真偽値で指定します。
@return GC.compact の返り値と同じです。
@see GC.compact... -
GC
. auto _ compact=(bool) (12229.0) -
GC.compact をフルGCで行うかどうかを制御します。
...GC.compact をフルGCで行うかどうかを制御します。
true を設定するとフルGCのタイミングででヒープをコンパクションします。
この機能を有効にするとフルGCのパフォーマンスが低下します。
デフォルトは false です。
詳細......は17176を参照してください。
@param bool フルGCでコンパクションするかどうかを true か false で設定します。
@see GC.compact GC.auto_compact... -
GC
. auto _ compact -> bool (12207.0) -
auto compaction が有効化どうかを返します。
...auto compaction が有効化どうかを返します。
@return auto compaction が有効な場合 true を返します。
そうでなければ false を返します。
@see GC.auto_compact=... -
Gem
:: Indexer # compact _ specs(specs) -> Array (12201.0) -
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して 返します。
...与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して
返します。
@param specs Gem::Specification の配列を指定します。...