11件ヒット
[1-11件を表示]
(0.044秒)
モジュール
- Kernel (11)
検索結果
-
Kernel
. # at _ exit { . . . } -> Proc (18163.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...