47件ヒット
[1-47件を表示]
(0.025秒)
別のキーワード
検索結果
先頭4件
-
Continuation (38036.0)
-
継続を表すクラスです。
...カル変数の定義、スタックフレーム)を cont に記憶
してブロックを実行します。cont は、Continuation クラスのインスタ
ンスで、Continuation#call メソッドを実行するこ
とでいつでも記憶した状態を継続することができます。
C 言......という違いがあります)
callcc() は、ブロックの戻り値を返しますが、Continuation#call(args)
が呼び出されたときは args を返します。
例:
以下は、Continuationによる無限ループの例
def LOOP
c = nil
yield callcc {|cnt| c = cnt; true......}
c.call(false)
end
LOOP {|v| p v}
=> true
false
false
false
:
:
callcc とは、call-with-current-continuation の略です。... -
NEWS for Ruby 2
. 2 . 0 (18.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...す。Ruby 2.2以前は読み込みモードで開いていました。
=== 標準添付ライブラリの更新 (優れたもののみ)
* continuation
* callcc は廃止されました。Fiberを使ってください。
* digest
* Kernel.#Digest はスレッドセーフになりま......sis
* 追加: Vector#-@, Vector#+@, Matrix#-@, Matrix#+@
* 追加: Vector#cross_product
* 追加: Vector#dot
* 追加: Vector#angle_with
* 追加: Vector.independent?, Vector#independent?
* pathname
* Pathname#/ は Pathname#+ のエイリアスです
* 追加: Pathnam......nt.
* rb_thread_blocking_region_begin -> rb_thread_call_without_gvl family
* rb_thread_blocking_region_end -> rb_thread_call_without_gvl family
* TRAP_BEG -> rb_thread_call_without_gvl family
* TRAP_END -> rb_thread_call_without_gvl family
* rb_thread_select -> rb_thread_fd_selec... -
Marshal
. # dump(obj , limit = -1) -> String (12.0) -
obj を指定された出力先に再帰的に出力します。
...Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェクト
また、これらのオブジェクトを間接的に指......Proc を間接的に指していることになります。
//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}
マーシャルの動作を任意に定義することもできます。
@param obj ダンプする対象のオブ... -
Marshal
. # dump(obj , port , limit = -1) -> IO (12.0) -
obj を指定された出力先に再帰的に出力します。
...Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェクト
また、これらのオブジェクトを間接的に指......Proc を間接的に指していることになります。
//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}
マーシャルの動作を任意に定義することもできます。
@param obj ダンプする対象のオブ...