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::UID.re_exchange

() -> ::Integer
Process::UID.re_exchange → integer

Exchange real and effective user IDs and return the new effective user ID. Not available on all platforms.

Example
[Process.uid, Process.euid]   #=> [0, 31]
Process::UID.re_exchange      #=> 0
[Process.uid, Process.euid]   #=> [31, 0]