setgid? Returns true if it has the set group id permission bit set
File.stat("testfile").setgid? File.stat("/usr/sbin/postdrop").setgid?