* string.c (rb_str_set_len): call rb_str_modify.
* file.c (realpath_rec): don't call rb_str_modify before rb_str_set_len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d60d63ef80
commit
f6f3d1bc0e
@ -1,3 +1,10 @@
|
||||
Tue Jan 12 21:56:00 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* string.c (rb_str_set_len): call rb_str_modify.
|
||||
|
||||
* file.c (realpath_rec): don't call rb_str_modify before
|
||||
rb_str_set_len.
|
||||
|
||||
Tue Jan 12 20:44:14 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* file.c (realpath_internal): call rb_secure.
|
||||
|
1
file.c
1
file.c
@ -3098,7 +3098,6 @@ realpath_rec(long *prefixlenp, VALUE *resolvedp, char *unresolved, VALUE loopche
|
||||
if (*prefixlenp < RSTRING_LEN(*resolvedp)) {
|
||||
char *resolved_names = RSTRING_PTR(*resolvedp) + *prefixlenp;
|
||||
long len = rb_path_last_separator(resolved_names) - resolved_names;
|
||||
rb_str_modify(*resolvedp);
|
||||
rb_str_set_len(*resolvedp, *prefixlenp + len);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user