diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-12 08:33:04 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-12 08:33:04 +0000 |
commit | 5d941186af3e052c28f3d1f175fb674ce3207b79 (patch) | |
tree | af0a530c9a47ae65f5b95442d72823522595780e | |
parent | c5fb7cf4fb7759ae020032f344460c2accef2bc7 (diff) | |
download | ruby-5d941186af3e052c28f3d1f175fb674ce3207b79.tar.gz |
1.3.8 to be/1999-08-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | eval.c | 26 |
2 files changed, 26 insertions, 18 deletions
@@ -1,3 +1,21 @@ +Thu Aug 12 13:44:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp> + + * eval.c (Init_load): require receives 1 argument. + + * eval.c (frame_dup): should clear tmp to avoid dangling + references. + +Wed Aug 11 13:33:13 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp> + + * eval.c (rb_eval): no automatic aggregate initialization. + + * eval.c (module_setup): ditto. + +Wed Aug 11 18:18:41 1999 WATANABE Tetsuya <tetsu@jpn.hp.com> + + * eval.c (yield_under_i): automatic aggregate initialization is an + ANSI feature. + Wed Aug 11 10:10:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp> * parse.y (yylex): parse `[].length==0' as `([].length)==0', not @@ -2213,8 +2213,9 @@ rb_eval(self, node) case NODE_SCOPE: { - struct FRAME frame = *ruby_frame; + struct FRAME frame; + frame = *ruby_frame; frame.tmp = ruby_frame; ruby_frame = &frame; @@ -2851,12 +2852,13 @@ module_setup(module, node) NODE * volatile node; { int state; - struct FRAME frame = *ruby_frame; + struct FRAME frame; VALUE result; /* OK */ char *file = ruby_sourcefile; int line = ruby_sourceline; TMP_PROTECT; + frame = *ruby_frame; frame.tmp = ruby_frame; ruby_frame = &frame; @@ -4392,13 +4394,14 @@ yield_under_i(self) { if (ruby_block->flags & BLOCK_DYNAMIC) { struct BLOCK * volatile old_block = ruby_block; - struct BLOCK block = *ruby_block; + struct BLOCK block; volatile VALUE cbase = ruby_block->frame.cbase; /* cbase should be pointed from volatile local variable */ /* to be protected from GC. */ VALUE result; int state; + block = *ruby_block; /* copy the block to avoid modifying global data. */ block.frame.cbase = ruby_frame->cbase; ruby_block = █ @@ -4819,20 +4822,6 @@ rb_require(fname) return rb_f_require(Qnil, rb_str_new2(fname)); } -static VALUE -require_method(argc, argv, self) - int argc; - VALUE *argv; - VALUE self; -{ - int i; - - for (i=0; i<argc; i++) { - rb_f_require(self, argv[i]); - } - return Qnil; -} - static void set_method_visibility(self, argc, argv, ex) VALUE self; @@ -5282,7 +5271,7 @@ Init_load() rb_define_readonly_variable("$\"", &rb_features); rb_define_global_function("load", rb_f_load, -1); - rb_define_global_function("require", require_method, -1); + rb_define_global_function("require", rb_f_require, 1); rb_define_global_function("autoload", rb_f_autoload, 2); rb_global_variable(&ruby_wrapper); } @@ -5381,6 +5370,7 @@ frame_dup(frame) MEMCPY(argv, frame->argv, VALUE, frame->argc); frame->argv = argv; } + frame->tmp = 0; /* should not preserve tmp */ if (!frame->prev) break; tmp = ALLOC(struct FRAME); *tmp = *frame->prev; |