るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. matrix i

ライブラリ

モジュール

キーワード

検索結果

Array#take_while {|element| ... } -> Array (21327.0)

配列の要素を順に偽になるまでブロックで評価します。 最初に偽になった要素の手前の要素までを配列として返します。 このメソッドは自身を破壊的に変更しません。

...の要素までを配列として返します。
このメソッドは自身を破壊的に変更しません。

//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.take_while {|i| i < 3 } # => [1, 2]
//}

ブロックを省略した場合は Enumerator を返します。

@see Enumerable#take_while...

Rinda::TupleSpaceProxy#take(tuple, sec = nil) -> Array | Hash (21326.0)

tuple にマッチするタプルをタプルスペースから取り出して返します。

...Rinda::TupleSpace#take にフォワードされます。
詳細は Rinda::TupleSpace#take を参照してください。

@param tuple タプルのパターン
@param sec タイムアウト秒数
@raise Rinda::RequestExpiredError take がタイムアウトした場合に発生します
@raise Ridna...
...::RequestCanceledError take が何らかの理由でキャンセルされた場合に発生します。...

Rinda::TupleSpace#take(tuple, sec = nil) -> Array | Hash (21320.0)

tuple にマッチするタプルをタプルスペースから取り出して返します。

...le にマッチするタプルをタプルスペースから取り出して返します。

tuple で指定できるパターンについては lib:rinda/rinda#tuplepattern を
参照してください。

マッチするタプルが存在しない場合は、マッチするタプルがタプルス...
...時には take をあきらめ
例外 Rinda::RequestExpiredError を発生させます。
sec に nil を指定するとタイムアウトせずに無限に待ち続けます。

@param tuple タプルのパターン
@param sec タイムアウト秒数
@raise Rinda::RequestExpiredError take がタ...
...イムアウトした場合に発生します
@raise Ridna::RequestCanceledError take が何らかの理由でキャンセルされた場合に発生します。...

Array#take_while -> Enumerator (21227.0)

配列の要素を順に偽になるまでブロックで評価します。 最初に偽になった要素の手前の要素までを配列として返します。 このメソッドは自身を破壊的に変更しません。

...の要素までを配列として返します。
このメソッドは自身を破壊的に変更しません。

//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.take_while {|i| i < 3 } # => [1, 2]
//}

ブロックを省略した場合は Enumerator を返します。

@see Enumerable#take_while...

Enumerable#take_while {|element| ... } -> Array (12333.0)

Enumerable オブジェクトの要素を順に偽になるまでブロックで評価します。 最初に偽になった要素の手前の要素までを配列として返します。

...クで評価します。
最初に偽になった要素の手前の要素までを配列として返します。

//emlist[例][ruby]{
e = [1, 2, 3, 4, 5, 0].each
e.take_while {|i| i < 3 } # => [1, 2]
//}

ブロックを省略した場合は Enumerator を返します。

@see Array#take_while...

絞り込み条件を変える

Enumerable#take_while -> Enumerator (12233.0)

Enumerable オブジェクトの要素を順に偽になるまでブロックで評価します。 最初に偽になった要素の手前の要素までを配列として返します。

...クで評価します。
最初に偽になった要素の手前の要素までを配列として返します。

//emlist[例][ruby]{
e = [1, 2, 3, 4, 5, 0].each
e.take_while {|i| i < 3 } # => [1, 2]
//}

ブロックを省略した場合は Enumerator を返します。

@see Array#take_while...

NEWS for Ruby 3.0.0 (132.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...
...16131 17136
* yield in singleton class definitions in methods is now a SyntaxError
i
nstead of a warning. yield in a class definition outside of a method
i
s now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor...
...standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

=== `--backtrace-limit` option

The `--backtrace-limit` option limits the maximum length of a backtrace.
8661

== Core classes updates

Outstanding ones only.

* Array
*...

NEWS for Ruby 2.7.0 (42.0)

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

...ルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

* パターンマッチが実験的機能として導入されました。 14912

//emlist[][ruby]{
case [0, [1, 2, 3]]
i
n [a, [b, *c]]
p a #=> 0...
...240
nil以外の時はString#splitで参照した時も警告が出ます。
この警告は「-W:no-deprecated」オプションで止められます。

* 「$,」にnil以外の値を設定すると警告が出るようになりました。 14240
nil以外の時はArray#joinで参...
...!?", "BAR!?", "BAZ!?"]
//}
//emlist[Enumerator::Lazy#with_index][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
# => 1:a
# 2:b
# 3:c
//}

* Fiber
* 新規メソッド
* Fiber#raiseメソッドが追加され、Fiber#resumeのように...