11件ヒット
[1-11件を表示]
(0.028秒)
ライブラリ
- ビルトイン (11)
検索結果
-
Kernel
. # at _ exit { . . . } -> Proc (18263.0) -
与えられたブロックをインタプリタ終了時に実行します。
...に実行します。
at_exitがメソッドである点を除けば、END ブロックによる終了
処理の登録と同等です。登録した処理を取り消すことはできません。
spec/terminateも参照してください。
@return 登録した処理を Proc オブジェクトで......返します。
//emlist[例][ruby]{
3.times do |i|
at_exit{puts "at_exit#{i}"}
end
END{puts "END"}
at_exit{puts "at_exit"}
puts "main_end"
#=> main_end
# at_exit
# END
# at_exit2
# at_exit1
# at_exit0
//}
@see d:spec/control#END,Kernel.#exit!,Kernel.#fork...