るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.031秒)
トップページ > バージョン:2.4.0[x] > モジュール:Kernel[x] > クエリ:kernel[x] > クエリ:proc[x] > クエリ:at_exit[x]

別のキーワード

  1. _builtin to_proc
  2. _builtin proc
  3. proc curry
  4. httpserver mount_proc
  5. readline completion_proc

ライブラリ

検索結果

Kernel.#at_exit { ... } -> Proc (81826.0)

与えられたブロックをインタプリタ終了時に実行します。

...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...