summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-23 07:05:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-23 07:05:59 +0000
commitdc074ec107e288dfc7b40d45afe3009c968021ca (patch)
tree7f28628ea80b0ead6ad861021d3aea398b750256
parented7cd88b0d7e89ea34aff78903fa83c4c5d6bb32 (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--ChangeLog4
-rw-r--r--bignum.c9
-rw-r--r--eval.c2
-rw-r--r--marshal.c2
-rw-r--r--parse.y16
-rw-r--r--version.h4
6 files changed, 24 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 472c21f051..006d4b779e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)
diff --git a/bignum.c b/bignum.c
index 12af58e9b8..127f32baba 100644
--- a/bignum.c
+++ b/bignum.c
@@ -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);
}
diff --git a/eval.c b/eval.c
index 2f86900e60..60d8a64793 100644
--- a/eval.c
+++ b/eval.c
@@ -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) {
diff --git a/marshal.c b/marshal.c
index 803e44151b..15a1486f24 100644
--- a/marshal.c
+++ b/marshal.c
@@ -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 */
}
diff --git a/parse.y b/parse.y
index 33b2d7b466..66b44cc17e 100644
--- a/parse.y
+++ b/parse.y
@@ -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;
diff --git a/version.h b/version.h
index bb2f817f4c..212a164f60 100644
--- a/version.h
+++ b/version.h
@@ -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