diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | bcc32/Makefile.sub | 2 | ||||
-rw-r--r-- | compar.c | 26 | ||||
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | version.h | 6 |
5 files changed, 34 insertions, 10 deletions
@@ -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 55cb3fe138..f3f36f7fdb 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 @@ -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 @@ -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'; } @@ -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 |