summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1994-12-20 00:46:19 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:31 +0900
commitbd0c733b77b561f4d12daccebf06a7c71917000b (patch)
tree748e0d92722709909a25523fc5e90e4aec687a23 /eval.c
parentb3f9ba5a3720de81a9a14d9d906509f81abeef7a (diff)
version 0.63v0_63
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.63.tar.gz Tue Dec 20 00:46:19 1994 Yukihiro Matsumoto (matz@dyna) * 0.63 released * eval.c(rb_call): superの呼び出しで落ちる.argc, argvの設定を忘れ ていた. * parse.y(read_escape): 展開エラー. * variable.c: 定義済みの変数のhookを変更しないように.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index e40d78121f..952d8c2f7d 100644
--- a/eval.c
+++ b/eval.c
@@ -3,7 +3,7 @@
eval.c -
$Author: matz $
- $Date: 1994/12/19 08:39:17 $
+ $Date: 1994/12/20 05:07:05 $
created at: Thu Jun 10 14:22:17 JST 1993
Copyright (C) 1994 Yukihiro Matsumoto
@@ -548,7 +548,6 @@ rb_eval(node)
sourceline = node->line;
-#undef SAFE_SIGHANDLE
#ifdef SAFE_SIGHANDLE
{
extern int trap_pending;
@@ -1612,6 +1611,8 @@ rb_call(class, recv, mid, argc, argv, func, itr)
else {
the_env->arg_ary = Qnil;
}
+ the_env->argc = argc;
+ the_env->argv = argv;
if (nd_type(body) == NODE_CFUNC) {
int len = body->nd_argc;
@@ -2109,8 +2110,10 @@ Sblk_new(class)
if (!iterator_p() && !Fiterator_p()) {
Fail("tryed to create Block out of iterator");
}
+
if (the_block->block) return the_block->block;
- blk = obj_alloc(C_Block);
+ blk = obj_alloc(class);
+
Make_Data_Struct(blk, blkdata, struct BLOCK, Qnil, blk_free, data);
memcpy(data, the_block, sizeof(struct BLOCK));
scope = the_scope;
@@ -2141,6 +2144,12 @@ Sblk_new(class)
return blk;
}
+VALUE
+blk_new()
+{
+ return Sblk_new(C_Block);
+}
+
static VALUE
Fblk_do(blk, args)
VALUE blk, args;