summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 05:12:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 05:12:50 +0000
commit5425f8fe6ead9c2b57547cc64f5b4316fc86bdf1 (patch)
tree780fdc5ca7e4f213bae955c33720c10b8835eeab /ruby.c
parentae824807055802a812a23f19cd1a5086223df11d (diff)
* ruby.c (ruby_init_loadpath_safe): ensure sopath to be modifiable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 5196b0faf0..155ef5fbfa 100644
--- a/ruby.c
+++ b/ruby.c
@@ -426,7 +426,7 @@ ruby_init_loadpath_safe(int safe_level)
#define PREFIX_PATH() rb_str_new(libpath, baselen)
#else
baselen = p - libpath;
- rb_str_set_len(sopath, baselen);
+ rb_str_resize(sopath, baselen);
libpath = RSTRING_PTR(sopath);
#define PREFIX_PATH() sopath
#endif