70件ヒット
[1-70件を表示]
(0.119秒)
別のキーワード
種類
- インスタンスメソッド (66)
- 文書 (4)
ライブラリ
- ビルトイン (66)
クラス
- Array (22)
- Enumerator (11)
-
Enumerator
:: Lazy (11)
モジュール
- Enumerable (22)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) - size (11)
検索結果
先頭5件
-
Enumerator
:: Lazy # drop _ while {|item| . . . } -> Enumerator :: Lazy (24265.0) -
Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
...Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.drop_while { |i| i < 42 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:drop_while>
1.step.lazy.drop_while { |i| i < 42 }.take(10).force
# => [42......, 43, 44, 45, 46, 47, 48, 49, 50, 51]
//}
@see Enumerable#drop_while... -
Array
# drop _ while -> Enumerator (24226.0) -
ブロックを評価して最初に偽となった要素の手前の要素まで捨て、 残りの要素を配列として返します。 このメソッドは自身を破壊的に変更しません。
...ロックを指定しなかった場合は、Enumerator を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
# 変数aの値は変化しない
a # => [1, 2, 3, 4, 5, 0]
//}
@see Enumerable#drop_while, Array#drop... -
Array
# drop _ while {|element| . . . } -> Array (24226.0) -
ブロックを評価して最初に偽となった要素の手前の要素まで捨て、 残りの要素を配列として返します。 このメソッドは自身を破壊的に変更しません。
...ロックを指定しなかった場合は、Enumerator を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
# 変数aの値は変化しない
a # => [1, 2, 3, 4, 5, 0]
//}
@see Enumerable#drop_while, Array#drop... -
Enumerable
# drop _ while -> Enumerator (24220.0) -
ブロックを評価して最初に偽となった要素の手前の要素まで捨て、 残りの要素を配列として返します。
...価して最初に偽となった要素の手前の要素まで捨て、
残りの要素を配列として返します。
ブロックを指定しなかった場合は、Enumerator を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
//}... -
Enumerable
# drop _ while {|element| . . . } -> Array (24220.0) -
ブロックを評価して最初に偽となった要素の手前の要素まで捨て、 残りの要素を配列として返します。
...価して最初に偽となった要素の手前の要素まで捨て、
残りの要素を配列として返します。
ブロックを指定しなかった場合は、Enumerator を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
//}... -
Enumerator
# size -> Integer | Float :: INFINITY | nil (6106.0) -
self の要素数を返します。
...:INFINITY を返します。
Enumerator.new に Proc オブジェクトを指定していた場合はその
実行結果を返します。呼び出した時に要素数が不明であった場合は nil を返し
ます。
//emlist[例][ruby]{
(1..100).to_a.permutation(4).size # => 94109400
loop.si......ze # => Float::INFINITY
(1..100).drop_while.size # => nil
//}
@see Enumerator.new... -
NEWS for Ruby 3
. 0 . 0 (12.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting......single rest argument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leadin......race-limit` option limits the maximum length of a backtrace.
8661
== Core classes updates
Outstanding ones only.
* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while...