summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ruby.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index b94937b0da..f297c2b0a8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -671,8 +671,11 @@ ruby_init_loadpath(void)
p = p2;
}
#endif
+ baselen = p - libpath;
+ }
+ else {
+ baselen = 0;
}
- baselen = p - libpath;
rb_str_resize(sopath, baselen);
libpath = RSTRING_PTR(sopath);
#define PREFIX_PATH() sopath