summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ruby.c13
-rw-r--r--version.h4
3 files changed, 13 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 027c2c75a18..ee3f30a3a50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Jul 29 21:57:30 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * ruby.c (rubylib_mangle): provide another buffer for the result.
+
Wed Jul 26 10:09:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* configure.in: set SOLIBS to LIBS on Cygwin.
diff --git a/ruby.c b/ruby.c
index 632d87ef559..961aeb58669 100644
--- a/ruby.c
+++ b/ruby.c
@@ -115,7 +115,7 @@ rubylib_mangle(s, l)
{
static char *newp, *oldp;
static int newl, oldl, notfound;
- static char ret[STATIC_FILE_LENGTH+1];
+ static char newsub[STATIC_FILE_LENGTH+1];
if (!newp && !notfound) {
newp = getenv("RUBYLIB_PREFIX");
@@ -133,8 +133,8 @@ rubylib_mangle(s, l)
if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
rb_fatal("malformed RUBYLIB_PREFIX");
}
- strcpy(ret, newp);
- s = ret;
+ strcpy(newsub, newp);
+ s = newsub;
while (*s) {
if (*s == '\\') *s = '/';
s++;
@@ -147,6 +147,7 @@ rubylib_mangle(s, l)
l = strlen(s);
}
if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {
+ static char ret[STATIC_FILE_LENGTH+1];
strncpy(ret, s, l);
ret[l] = 0;
return ret;
@@ -154,9 +155,9 @@ rubylib_mangle(s, l)
if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {
rb_fatal("malformed RUBYLIB_PREFIX");
}
- strcpy(ret + newl, s + oldl);
- ret[l + newl - oldl] = 0;
- return ret;
+ strcpy(newsub + newl, s + oldl);
+ newsub[l + newl - oldl] = 0;
+ return newsub;
}
#define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
#define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
diff --git a/version.h b/version.h
index 3eb7b2c1703..1109711c7c4 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.5.5"
-#define RUBY_RELEASE_DATE "2000-07-27"
+#define RUBY_RELEASE_DATE "2000-07-29"
#define RUBY_VERSION_CODE 155
-#define RUBY_RELEASE_CODE 20000727
+#define RUBY_RELEASE_CODE 20000729