るりまサーチ

最速Rubyリファレンスマニュアル検索!
10件ヒット [1-10件を表示] (0.008秒)
トップページ > クエリ:lazy[x] > クエリ:force[x] > 種類:文書[x]

別のキーワード

  1. lazy slice_before
  2. _builtin lazy
  3. lazy zip
  4. lazy chunk
  5. lazy to_enum

キーワード

検索結果

NEWS for Ruby 2.7.0 (67.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...を作成するための
Enumerator.produceメソッドが追加されました。 14781
* lazy enumerator から lazy ではない enumerator を生成する
Enumerator::Lazy#eagerメソッドが追加されました。 15901
* Enumerator::Yielder#to_procメソッドが...
...ク引数として渡せるようになりました。 15618
* Enumerator::Lazy#with_indexメソッドが追加され、
以前のlazyではないEnumerator#with_indexのデフォルト実装から
lazy
になりました。7877

//emlist[Enumerator.produce][ruby]{
require "date"
dates...
...//}
//emlist[Enumerator::Lazy#eager][ruby]{
a = %w(foo bar baz)
e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
p e.class #=> Enumerator
p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"]
//}
//emlist[Enumerator::Lazy#with_index][ruby]{
("a"..).lazy.with_index(1) { |it, in...

NEWS for Ruby 3.1.0 (31.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...list{
Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a
#=> [[3, 5], [5, 7], [11, 13]]
//}

* ピン演算子がインスタンス変数、クラス変数、グローバル変数をサポートしました。 17724

//emlist{
@n = 5
Prime.each_cons(2).lazy.find{_1 in [n, ^@n]}
#=>...
..._cons(2){}
# 3.0 => nil
# 3.1 => [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 がパスの階...
...るかもしれません。 17866

== C API の更新

* ドキュメント化されました。 https://github.com/ruby/ruby/pull/4815
* rb_gc_force_recycleは非推奨で、no-op関数に変更されました。 18290

== 実装の改善

* クラス変数の読み込みにインラインキ...