method

change_privilege

v1_9_3_125 - Show latest stable - Class: Process::UID
change_privilege(p1)
public

Change the current process’s real and effective user ID to that specified by integer. Returns the new user ID. Not available on all platforms.

[Process.uid, Process.euid]          #=> [0, 0]
Process::UID.change_privilege(31)    #=> 31
[Process.uid, Process.euid]          #=> [31, 31]