Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Process::Status#>>

stat >> places → integer

This method is deprecated as to_i value is system-specific; use predicate methods like exited? or stopped?, or getters like exitstatus or stopsig.

Returns the value of to_i, shifted places to the right:

Example
`cat /nop`
stat = $?                 # => #<Process::Status: pid 1155508 exit 1>
stat.to_i                 # => 256
stat >> 1                 # => 128
stat >> 2                 # => 64

ArgumentError is raised if places is negative.

Ruby version changes

  1. 3.3
See also #== #coredump? #& #exited? also in 3.4 · 3.2 · 3.1 · 3.0