Skip to content

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

class method

Process.argv0

() -> ::String
Process.argv0 → frozen_string

Returns the name of the script being executed. The value is not affected by assigning a new value to $0.

This method first appeared in Ruby 2.1 to serve as a global variable free means to get the script name.

See also .abort .clock_getres .clock_gettime also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0