Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Kernel#exit!

(?::int | bool status) -> bot
exit!(status = false)
Process.exit!(status = false)

Exits the process immediately; no exit handlers are called. Returns exit status status to the underlying operating system.

Example
Process.exit!(true)

Values true and false for argument status indicate, respectively, success and failure; The meanings of integer values are system-dependent.

See also #exit #fail #exec #Float also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0