diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-23 07:05:59 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-23 07:05:59 +0000 |
commit | dc074ec107e288dfc7b40d45afe3009c968021ca (patch) | |
tree | 7f28628ea80b0ead6ad861021d3aea398b750256 | |
parent | ed7cd88b0d7e89ea34aff78903fa83c4c5d6bb32 (diff) |
2000-06-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | bignum.c | 9 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | marshal.c | 2 | ||||
-rw-r--r-- | parse.y | 16 | ||||
-rw-r--r-- | version.h | 4 |
6 files changed, 24 insertions, 13 deletions
@@ -1,3 +1,7 @@ +Fri Jun 23 01:11:27 2000 Yukihiro Matsumoto <matz@netlab.co.jp> + + * parse.y (new_super): should tweak block_pass node for super too. + Wed Jun 21 22:20:34 2000 WATANABE Hirofumi <eban@os.rim.or.jp> * configure.in: support for gcc version 2.95.2 19991024 (release-2) @@ -882,13 +882,8 @@ bigdivmod(x, y, div, mod, modulo) RBIGNUM(*mod)->len = ny; RBIGNUM(*mod)->sign = RBIGNUM(x)->sign; if (modulo && RBIGNUM(x)->sign != RBIGNUM(y)->sign) { - long len = ny; - zds = BDIGITS(*mod); - while (len && !zds[len]) len--; - if (len > 0) { - *mod = bigadd(*mod, y, 1); - return; - } + *mod = bigadd(*mod, y, 1); + return; } *mod = bignorm(*mod); } @@ -4739,7 +4739,7 @@ rb_load(fname, wrap) PUSH_FRAME(); ruby_frame->last_func = 0; ruby_frame->last_class = 0; - ruby_frame->self = ruby_top_self; + ruby_frame->self = self; ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,ruby_class,0,0); PUSH_SCOPE(); if (ruby_class == rb_cObject && top_scope->local_tbl) { @@ -958,7 +958,7 @@ Init_marshal() s_load = rb_intern("_load"); rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1); rb_define_module_function(rb_mMarshal, "load", marshal_load, -1); - rb_define_module_function(rb_mMarshal, "restore", marshal_load, 1); + rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1); rb_provide("marshal.so"); /* for backward compatibility */ } @@ -81,6 +81,7 @@ static int in_defined = 0; static NODE *arg_blk_pass(); static NODE *new_call(); static NODE *new_fcall(); +static NODE *new_super(); static NODE *gettable(); static NODE *assignable(); @@ -444,7 +445,7 @@ command_call : operation call_args { if (!compile_for_eval && !cur_mid && !in_single) yyerror("super called outside of method"); - $$ = NEW_SUPER($2); + $$ = new_super($2); fixpos($$, $2); } @@ -1393,7 +1394,7 @@ method_call : operation '(' opt_call_args close_paren if (!compile_for_eval && !cur_mid && !in_single && !in_defined) yyerror("super called outside of method"); - $$ = NEW_SUPER($3); + $$ = new_super($3); } | kSUPER { @@ -4200,6 +4201,17 @@ new_fcall(m,a) return NEW_FCALL(m,a); } +static NODE* +new_super(a) + NODE *a; +{ + if (a && nd_type(a) == NODE_BLOCK_PASS) { + a->nd_iter = NEW_SUPER(a->nd_head); + return a; + } + return NEW_SUPER(a); +} + static struct local_vars { ID *tbl; int nofree; @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.4.5" -#define RUBY_RELEASE_DATE "2000-06-20" +#define RUBY_RELEASE_DATE "2000-06-23" #define RUBY_VERSION_CODE 145 -#define RUBY_RELEASE_CODE 20000620 +#define RUBY_RELEASE_CODE 20000623 |