summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-09 04:40:14 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-09 04:40:14 +0000
commitc40625c6fdaf1d564de72ce6532a8cc0d3152855 (patch)
tree15c6d185485c67257017b837411d4bb75b6e2216 /file.c
parent2ed7d6d7279d413d7af62d9b20cc17fb2b1e7650 (diff)
merges r28885 from trunk into ruby_1_9_2.
-- * file.c (realpath_rec): rb_str_modify depends on the length, so resize instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 47a2269fb1..7c5367ff3a 100644
--- a/file.c
+++ b/file.c
@@ -3216,7 +3216,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_set_len(*resolvedp, *prefixlenp + len);
+ rb_str_resize(*resolvedp, *prefixlenp + len);
}
}
else {