summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-01-21 09:04:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-01-21 09:04:58 +0000
commit8ef071c882218ff2d9f00f51f55e872343776104 (patch)
tree93989de48296e87724e9cf379c5f1395a14acb31 /ruby.c
parent41d0ebf4660c74a92bfd9484bd3659d5367d2d76 (diff)
1.2.2 release
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ruby.c b/ruby.c
index 9e060c0783..f80873eb1a 100644
--- a/ruby.c
+++ b/ruby.c
@@ -715,10 +715,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);