summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 8ce1f8dfe3..355f8e8a8a 100644
--- a/file.c
+++ b/file.c
@@ -2865,7 +2865,9 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
buf = p + 1;
p += s-b;
}
- rb_home_dir(buf, result);
+ if (NIL_P(rb_home_dir(buf, result))) {
+ rb_raise(rb_eArgError, "can't find user %s", buf);
+ }
BUFINIT();
p = pend;
}