summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-08 12:42:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-08 12:42:39 +0000
commit305376d556bb6e9ed9391e6e6040ae748b53d890 (patch)
treeaf3a6c7a629ffa5b4751392a33dc54def57c2bd7 /eval.c
parent2f12c07c76c38a377e98555f1af738a8aa12f112 (diff)
* 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/branches/ruby_1_6@1819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 8ae640fabf..bbc735187e 100644
--- a/eval.c
+++ b/eval.c
@@ -1363,9 +1363,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;
@@ -4462,7 +4464,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);
+ }
}
if (node->nd_rest >= 0) {
VALUE v;