summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
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