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