From 76204d7a5288fa8237c95674bd77d682e2fe284b Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 8 Nov 2001 12:42:39 +0000 Subject: [PATCH] * eval.c (rb_trap_eval): avoid annoying warning with signal. [ruby-talk:23225] * eval.c (rb_call0): adjust caller source file/line while evaluating optional arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ eval.c | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c0a981309e..c919f76fd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Nov 8 20:20:37 2001 Nobuyoshi Nakada + + * eval.c (rb_trap_eval): avoid annoying warning with signal. + [ruby-talk:23225] + + * eval.c (rb_call0): adjust caller source file/line while + evaluating optional arguments. + Thu Nov 8 18:21:02 2001 Yukihiro Matsumoto * file.c (path_check_1): forgot to initialize 'p'. diff --git a/eval.c b/eval.c index 90f17e5be4..e91fa8a7a3 100644 --- a/eval.c +++ b/eval.c @@ -1394,9 +1394,11 @@ rb_trap_eval(cmd, sig) VALUE val; /* OK */ PUSH_TAG(PROT_NONE); + PUSH_ITER(ITER_NOT); if ((state = EXEC_TAG()) == 0) { val = rb_eval_cmd(cmd, rb_ary_new3(1, INT2FIX(sig))); } + POP_ITER(); POP_TAG(); if (state) { rb_trap_immediate = 0; @@ -4559,7 +4561,11 @@ rb_call0(klass, recv, id, argc, argv, body, nosuper) argv++; argc--; opt = opt->nd_next; } - rb_eval(recv, opt); + if (opt) { + ruby_sourcefile = opt->nd_file; + ruby_sourceline = nd_line(opt); + rb_eval(recv, opt); + } } local_vars = ruby_scope->local_vars; if (node->nd_rest >= 0) {