summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-30 16:33:32 (GMT)
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-30 16:33:32 (GMT)
commit394738639ed4b4d2bacb40a1ac170950b09cbd95 (patch)
tree79f6160bf89ffba6449eb884f76af8c5f3224651
parent2c2b30dde4f7b26fbe63b6ba74f2bc7ac98d35ba (diff)
031031
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--bcc32/Makefile.sub2
-rw-r--r--compar.c26
-rw-r--r--eval.c1
-rw-r--r--version.h6
5 files changed, 34 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f70af23..1daa95a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Oct 31 01:02:24 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * compar.c (cmp_equal): protect exceptions from <=> comparison
+ again. returns nil if any exception or error happened during
+ comparison.
+
+ * eval.c (search_required): should update *featurep when DLEXT2 is
+ defined. (ruby-bugs-ja PR#581)
+
Thu Oct 30 23:41:04 2003 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb: add DRbArray
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
index 55cb3fe..f3f36f7 100644
--- a/bcc32/Makefile.sub
+++ b/bcc32/Makefile.sub
@@ -514,7 +514,7 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
.y.c:
$(YACC) $(YFLAGS) $(<:\=/)
- sed -e "s!^extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $(@F)
+ sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $(@F)
@del y.tab.c
parse.c: parse.y
diff --git a/compar.c b/compar.c
index d6cca36..5376ce4 100644
--- a/compar.c
+++ b/compar.c
@@ -53,18 +53,32 @@ rb_cmperr(x, y)
#define cmperr() (rb_cmperr(x, y), Qnil)
static VALUE
+cmp_eq(a)
+ VALUE *a;
+{
+ VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
+
+ if (NIL_P(c)) return Qnil;
+ if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
+ return Qfalse;
+}
+
+static VALUE
+cmp_failed()
+{
+ return Qnil;
+}
+
+static VALUE
cmp_equal(x, y)
VALUE x, y;
{
- int c;
+ VALUE a[2];
if (x == y) return Qtrue;
- c = rb_funcall(x, cmp, 1, y);
- if (NIL_P(c)) return Qnil;
- if (c == INT2FIX(0)) return Qtrue;
- if (rb_cmpint(c, x, y) == 0) return Qtrue;
- return Qfalse;
+ a[0] = x; a[1] = y;
+ return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
}
static VALUE
diff --git a/eval.c b/eval.c
index d6978b0..56e6614 100644
--- a/eval.c
+++ b/eval.c
@@ -6011,6 +6011,7 @@ search_required(fname, featurep, path)
*featurep = tmp;
#ifdef DLEXT2
if (rb_find_file_ext(&tmp, loadable_ext+1)) {
+ *featurep = tmp;
*path = rb_find_file(tmp);
return 's';
}
diff --git a/version.h b/version.h
index a47f509..9e59044 100644
--- a/version.h
+++ b/version.h
@@ -1,11 +1,11 @@
#define RUBY_VERSION "1.8.1"
-#define RUBY_RELEASE_DATE "2003-10-30"
+#define RUBY_RELEASE_DATE "2003-10-31"
#define RUBY_VERSION_CODE 181
-#define RUBY_RELEASE_CODE 20031030
+#define RUBY_RELEASE_CODE 20031031
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2003
#define RUBY_RELEASE_MONTH 10
-#define RUBY_RELEASE_DAY 30
+#define RUBY_RELEASE_DAY 31