public static IRubyObject getpwuid(IRubyObject recv, IRubyObject[] args) {
Ruby runtime = recv.getRuntime();
POSIX posix = runtime.getPosix();
try {
int uid = args.length == 0 ? posix.getuid() : RubyNumeric.fix2int(args[0]);
Passwd pwd = posix.getpwuid(uid);
if(pwd == null) {
if (Platform.IS_WINDOWS) { // MRI behavior
return recv.getRuntime().getNil();
}
throw runtime.newArgumentError("can't find user for " + uid);