るりまサーチ

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

別のキーワード

  1. _builtin grep
  2. _builtin grep_v
  3. enumerable grep_v
  4. enumerable grep
  5. lazy grep

ライブラリ

クラス

キーワード

検索結果

Enumerator::Lazy#grep_v(pattern) {|item| ... } -> Enumerator::Lazy (18147.0)

Enumerable#grep_v と同じですが、配列ではなくEnumerator::Lazy を返します。

...Enumerable#grep_v と同じですが、配列ではなくEnumerator::Lazy を返します。

//emlist[例][ruby]{
(100..Float::INFINITY).lazy.map(&:to_s).grep_v(/(\d).*\1/)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: 100..Infinity>:map>:grep_v(/(\d).*\1/)>
(100..Float::INFINIT...
...Y).lazy.map(&:to_s).grep_v(/(\d).*\1/).take(15).force
# => ["102", "103", "104", "105", "106", "107", "108", "109", "120", "123", "124", "125", "126", "127", "128"]
//}

@see Enumerable#grep_v, Enumerable#grep, Enumerator::Lazy#grep...

NEWS for Ruby 3.0.0 (30.0)

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

...ning. yield in a class definition outside of a method
is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode)....
...ray#slice / Array#[]
* Array#take
* Array#take_while
* Array#uniq
* Array#*
* Can be sliced with Enumerator::ArithmeticSequence

//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1"...
...ALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17030
* Requiring 'open-uri' no longer redefines `Kernel#open`. Call `URI....

Enumerator::Lazy (18.0)

map や select などのメソッドの遅延評価版を提供するためのクラス。

...umerator を返す) ように再定義されています。

* map/collect
* flat_map/collect_concat
* select/find_all
* reject
* grep, grep_v
* take, take_while
* drop, drop_while
* slice_before, slice_after, slice_when
* chunk
* zip (※互換性のため、ブロックを渡さないケ...
...umerator を返す) ように再定義されています。

* map/collect
* flat_map/collect_concat
* select/find_all
* reject
* grep, grep_v
* take, take_while
* drop, drop_while
* slice_before, slice_after, slice_when
* chunk, chunk_while
* uniq
* zip (※互換性のため、ブロッ...
...す) ように再定義されています。

* map/collect
* flat_map/collect_concat
* filter_map
* select/find_all
* reject
* grep, grep_v
* take, take_while
* drop, drop_while
* slice_before, slice_after, slice_when
* chunk, chunk_while
* uniq
* zip (※互換性のため、ブロッ...
...す) ように再定義されています。

* map/collect
* flat_map/collect_concat
* filter_map
* select/find_all
* reject
* grep, grep_v
* take, take_while
* drop, drop_while
* slice_before, slice_after, slice_when
* chunk, chunk_while
* uniq
* compact
* zip (※互換性のため...

Enumerator::Lazy#grep(pattern) {|item| ... } -> Enumerator::Lazy (18.0)

Enumerable#grep と同じですが、配列ではなくEnumerator::Lazy を返します。

...umerator::Lazy: #<Enumerator::Lazy: 100..Infinity>:map>:grep(/\A(\d)\1+\z/)>
(100..Float::INFINITY).lazy.map(&:to_s).grep(/\A(\d)\1+\z/).take(10).force
# => ["111", "222", "333", "444", "555", "666", "777", "888", "999", "1111"]
//}

@see Enumerable#grep, Enumerable#grep_v, Enumerator::Lazy#grep_v...