summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/ruby.c b/ruby.c
index b96d3bb084..004dc1fe90 100644
--- a/ruby.c
+++ b/ruby.c
@@ -238,7 +238,7 @@ add_modules(mod)
}
void
-ruby_require_modules()
+ruby_require_libraries()
{
struct req_list *list = req_list_head.next;
struct req_list *tmp;
@@ -821,10 +821,15 @@ ruby_libpath()
strcpy(libpath, __dos_argv0);
#endif
p = strrchr(libpath, '\\');
- if (p)
+ if (p) {
*p = 0;
- if (!strcasecmp(p-4, "\\bin"))
- p -= 4;
+ if (!strcasecmp(p-4, "\\bin"))
+ p -= 4;
+ } else {
+ strcpy(libpath, ".");
+ p = libpath + 1;
+ }
+
strcpy(p, "\\lib");
#if defined(__CYGWIN32__)
p = (char *)malloc(strlen(libpath)+10);