home(p1 = v1)
public
Returns the home directory of the
current user or the named user if given.
static VALUE
dir_s_home(int argc, VALUE *argv, VALUE obj)
{
VALUE user;
const char *u = 0;
rb_scan_args(argc, argv, "01", &user);
if (!NIL_P(user)) {
SafeStringValue(user);
u = StringValueCStr(user);
}
return rb_home_dir(u, rb_str_new(0, 0));
}