るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.144秒)

別のキーワード

  1. entity ref
  2. pointer ref
  3. fiddle ref
  4. objectspace _id2ref
  5. _builtin _id2ref

ライブラリ

モジュール

検索結果

Kernel.#at_exit { ... } -> Proc (72787.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
# a...