Skip to content

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

instance method

Process::Status#==

(untyped other) -> bool
stat == other → true or false

Returns whether the value of to_i == other:

Example
`cat /nop`
stat = $?                # => #<Process::Status: pid 1170366 exit 1>
sprintf('%x', stat.to_i) # => "100"
stat == 0x100            # => true
See also .wait #coredump? #exited? also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0