diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | file.c | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Thu Aug 5 06:42:31 2010 Tanaka Akira <akr@fsij.org> + + * file.c (realpath_rec): call rb_str_modify before rb_str_set_len. + Wed Aug 4 19:37:00 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (rb_str_set_len): rb_str_modify cannot work before the @@ -3229,6 +3229,7 @@ realpath_rec(long *prefixlenp, VALUE *resolvedp, char *unresolved, VALUE loopche char *resolved_names = RSTRING_PTR(*resolvedp) + *prefixlenp; char *lastsep = rb_path_last_separator(resolved_names); long len = lastsep ? lastsep - resolved_names : 0; + rb_str_modify(*resolvedp); rb_str_set_len(*resolvedp, *prefixlenp + len); } } |