summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-25 16:33:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-25 16:33:57 +0000
commitf86be91b56c39808ca71056f40e4cf1c786c89b3 (patch)
treea1c8edc9c575aed842f2f49e98ce4f32ad21ca87 /file.c
parent044e75db6d810dece06d8a7921aae18a6024faa8 (diff)
* file.c (rb_file_expand_path_internal): fix r42160; skip '~'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index a72cdd0719..b3b6f2a2bb 100644
--- a/file.c
+++ b/file.c
@@ -2990,6 +2990,7 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
}
else {
s = nextdirsep(b = s, fend, enc);
+ b++; /* b[0] is '~' */
userlen = s - b;
BUFCHECK(bdiff + userlen >= buflen);
memcpy(p, b, userlen);