setuid? Returns true if it has the set user id permission bit set
File.stat("testfile").setuid? File.stat("/usr/bin/su").setuid?