From be712bae3a4af4161efc5cb48f6a2f62ef12d925 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 24 Apr 2001 06:44:13 +0000 Subject: [PATCH] * ruby.c (set_arg0): wrong predicate when new $0 value is bigger than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 32 ++++++++++++++++++++++++++++++++ eval.c | 4 +++- gc.c | 2 +- marshal.c | 2 +- numeric.c | 8 +++++--- object.c | 21 ++++++++++++++++++--- ruby.c | 6 +++--- version.h | 4 ++-- 8 files changed, 65 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19b9de0f3a..87925d39d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Tue Apr 24 15:35:32 2001 Yukihiro Matsumoto + + * ruby.c (set_arg0): wrong predicate when new $0 value is bigger + than original space. + +Mon Apr 23 14:43:59 2001 Yukihiro Matsumoto + + * gc.c (id2ref): should use NUM2ULONG() + + * object.c (rb_mod_const_get): check whether name is a class + variable name. + + * object.c (rb_mod_const_set): ditto. + + * object.c (rb_mod_const_defined): ditto. + Sun Apr 22 17:44:37 2001 WATANABE Hirofumi * configure.in: add -mieee to CFLAGS on Linux/Alpha @@ -5,6 +21,22 @@ Sun Apr 22 17:44:37 2001 WATANABE Hirofumi * configure.in: remove -ansi on OSF/1. +Sat Apr 21 22:33:26 2001 Yukihiro Matsumoto + + * marshal.c (w_float): precision changed to "%.16g" + +Sat Apr 21 22:07:58 2001 Guy Decoux + + * eval.c (rb_call0): wrong retry behavior. + +Fri Apr 20 19:12:20 2001 Yukihiro Matsumoto + + * numeric.c (fix_aref): a bug on long>int architecture. + +Fri Apr 20 14:57:15 2001 K.Kosako + + * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. + Wed Apr 18 04:37:51 2001 Wakou Aoyama * lib/cgi.rb: CGI::Cookie: no use PATH_INFO. diff --git a/eval.c b/eval.c index b822f5620d..8fc9cfcd6d 100644 --- a/eval.c +++ b/eval.c @@ -1257,6 +1257,7 @@ rb_eval_string_wrap(str, state) { int status; VALUE self = ruby_top_self; + VALUE wrapper = ruby_wrapper; VALUE val; PUSH_CLASS(); @@ -1268,6 +1269,7 @@ rb_eval_string_wrap(str, state) ruby_top_self = self; POP_CLASS(); + ruby_wrapper = wrapper; if (state) { *state = status; } @@ -4442,7 +4444,7 @@ rb_call0(klass, recv, id, argc, argv, body, nosuper) case TAG_RETRY: if (rb_block_given_p()) { - break; + JUMP_TAG(state); } /* fall through */ default: diff --git a/gc.c b/gc.c index d526a4df60..6b05260118 100644 --- a/gc.c +++ b/gc.c @@ -1289,7 +1289,7 @@ id2ref(obj, id) unsigned long ptr, p0; rb_secure(4); - p0 = ptr = NUM2UINT(id); + p0 = ptr = NUM2ULONG(id); if (ptr == Qtrue) return Qtrue; if (ptr == Qfalse) return Qfalse; if (ptr == Qnil) return Qnil; diff --git a/marshal.c b/marshal.c index 1f0efa8843..e911670edc 100644 --- a/marshal.c +++ b/marshal.c @@ -187,7 +187,7 @@ w_float(d, arg) { char buf[100]; - sprintf(buf, "%.12g", d); + sprintf(buf, "%.16g", d); w_bytes(buf, strlen(buf), arg); } diff --git a/numeric.c b/numeric.c index b5cd479a57..40e607b222 100644 --- a/numeric.c +++ b/numeric.c @@ -1295,12 +1295,14 @@ static VALUE fix_aref(fix, idx) VALUE fix, idx; { - unsigned long val = FIX2LONG(fix); + long val = FIX2LONG(fix); int i = NUM2INT(idx); - if (i < 0 || sizeof(VALUE)*CHAR_BIT-1 < i) + if (i < 0 || sizeof(VALUE)*CHAR_BIT-1 < i) { + if (val < 0) return INT2FIX(1); return INT2FIX(0); - if (val & (1< len) { - memcpy(origargv[0], s, len); - origargv[0][len] = '\0'; + if (i < len) { + memcpy(origargv[0], s, i); + origargv[0][i] = '\0'; } else { memcpy(origargv[0], s, i); diff --git a/version.h b/version.h index 3560f6193c..56efcff1ae 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.6.4" -#define RUBY_RELEASE_DATE "2001-04-19" +#define RUBY_RELEASE_DATE "2001-04-24" #define RUBY_VERSION_CODE 164 -#define RUBY_RELEASE_CODE 20010419 +#define RUBY_RELEASE_CODE 20010424