種類
- インスタンスメソッド (77)
- 特異メソッド (27)
- 文書 (20)
- クラス (3)
ライブラリ
- ビルトイン (74)
-
rexml
/ document (22) -
rubygems
/ indexer (11)
クラス
- Array (22)
-
Enumerator
:: Lazy (14) -
Gem
:: Indexer (11) - Hash (16)
-
REXML
:: Formatters :: Pretty (22)
モジュール
- Enumerable (3)
- GC (16)
キーワード
- Lazy (3)
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) -
auto
_ compact (3) -
auto
_ compact= (3) - compact! (19)
- compact= (11)
-
compact
_ specs (11) - new (11)
-
verify
_ compaction _ references (5)
検索結果
先頭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 の配列を指定します。 -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...Fiber#transfer is relaxed. 17221
* GC
* GC.auto_compact= and GC.auto_compact have been added to control when compaction runs. Setting `auto_compact=` to `true` will cause compaction to occur during major collections. At the moment, compaction adds significant overhead to major collections, s......e improvements of JIT-ed code
* Microarchitectural optimizations
* Native functions shared by multiple methods are deduplicated on JIT compaction.
* Decrease code size of hot paths by some optimizations and partitioning cold paths.
* Instance variables
* Eliminate som......timize C method calls a little.
* Compilation process improvements
* It does not keep temporary files in /tmp anymore.
* Throttle GC and compaction of JIT-ed code.
* Avoid GC-ing JIT-ed code when not necessary.
* GC-ing JIT-ed code is executed in a background thread.
* Reduce t... -
NEWS for Ruby 3
. 1 . 0 (18.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...< A; end
A.subclasses #=> [D, B]
B.subclasses #=> [C]
C.subclasses #=> []
//}
* Enumerable
* 新規メソッド
* Enumerable#compactが追加されました。 17312
* Enumerable#tallyがカウント集計用のハッシュオブジェクトを任意で渡せるように......> [1, 2, 3]
[1, 2, 3].each_slice(2){}
# 3.0 => nil
# 3.1 => [1, 2, 3]
//}
* Enumerator::Lazy
* 新規メソッド
* Enumerator::Lazy#compact が追加されました。 17312
* File
* 変更されたメソッド
* File.dirname がパスの階層を取り除く任意の引......長いメソッドのコンパイルをスキップしなくなりました。
* --mjit-verbose や --mjit-warning は、TracePoint または GC.compact が使用されており、JITコンパイルされたコードが無効になった時に "JIT cancel" と出力されるようになりまし...