Ruby 4.0 リファレンスマニュアル

singleton method Ruby::Box.current

current -> Ruby::Box | nilRuby 4.0 から[permalink][rdoc][edit]

現在実行中のコードが属しているボックスを返します。

Ruby::Box が無効なときは nil を返します。