7件ヒット
[1-7件を表示]
(0.045秒)
種類
- インスタンスメソッド (6)
- クラス (1)
クラス
- Enumerator (1)
-
Enumerator
:: ArithmeticSequence (4) - StopIteration (1)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # begin -> Numeric (63328.0) -
初項 (始端) を返します。
初項 (始端) を返します。
@see Enumerator::ArithmeticSequence#end -
Enumerator
# next -> object (63043.0) -
「次」のオブジェクトを返します。
「次」のオブジェクトを返します。
現在までの列挙状態に応じて「次」のオブジェクトを返し、列挙状態を1つ分進めます。
列挙が既に最後へ到達している場合は、
StopIteration 例外を発生します。このとき列挙状態は変化しません。
つまりもう一度 next を呼ぶと再び例外が発生します。
next メソッドによる外部列挙の状態は他のイテレータメソッドによる
内部列挙には影響を与えません。
ただし、 IO#each_line のようにおおもとの列挙メカニズムが副作用を
伴っている場合には影響があり得ます。
@raise StopIteration 列挙状態が既に最後へ到達しているとき
@... -
Enumerator
:: ArithmeticSequence # end -> Numeric | nil (9043.0) -
末項(終端)を返します。
末項(終端)を返します。
@see Enumerator::ArithmeticSequence#begin -
Enumerator
:: ArithmeticSequence # ==(other) -> bool (9025.0) -
Enumerable::ArithmeticSequence として等しいか判定します。
Enumerable::ArithmeticSequence として等しいか判定します。
other が Enumerable::ArithmeticSequence で
begin, end, step, exclude_end? が等しい時に
true を返します。
@param other 自身と比較する Enumerable::ArithmeticSequence -
Enumerator
:: ArithmeticSequence # hash -> Integer (9025.0) -
自身のハッシュ値を返します。
自身のハッシュ値を返します。
begin, end, step, exclude_end? が等しい Enumerable::ArithmeticSequence は
同じハッシュ値を返します。 -
StopIteration
# result -> object (97.0) -
この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。
この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。
object = Object.new
def object.each
yield :yield1
yield :yield2
:each_returned
end
enumerator = object.to_enum
p enumerator.next #=> :yield1
p enumerator.next #=> :yield2
begin
enumerator.next
rescue StopIteration => error
... -
Fiber (43.0)
-
ノンプリエンプティブな軽量スレッド(以下ファイバーと呼ぶ)を提供します。 他の言語では coroutine あるいは semicoroutine と呼ばれることもあります。 Thread と違いユーザレベルスレッドとして実装されています。
ノンプリエンプティブな軽量スレッド(以下ファイバーと呼ぶ)を提供します。
他の言語では coroutine あるいは semicoroutine と呼ばれることもあります。
Thread と違いユーザレベルスレッドとして実装されています。
Thread クラスが表すスレッドと違い、明示的に指定しない限り
ファイバーのコンテキストは切り替わりません。
またファイバーは親子関係を持ちます。Fiber#resume を呼んだファイバーが親になり
呼ばれたファイバーが子になります。親子関係を壊すような遷移(例えば
自分の親の親のファイバーへ切り替えるような処理)はできません。
例外 FiberErr...