summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-29 23:33:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-29 23:33:21 +0000
commita99de8466396ba4d056c126040dbf19ca5af20ff (patch)
treee50abe002122eabe64b9a040847eafb2920b5247 /file.c
parent7ae7ac4abab04f4351ae84f63f81b61a41843aff (diff)
* file.c (file_expand_path): should check if could find user.
[ruby-core:31538] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}