diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-08 12:42:39 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-08 12:42:39 +0000 |
| commit | 5f16a15d5e981bba53a1fb9f9f96dccef09f238e (patch) | |
| tree | b29f1ff1cf80ffbd23bcb06e97e47807d5a20f22 /eval.c | |
| parent | 1a2745b3ecb5a569aae3f99d74bbbe6b0a050858 (diff) | |
| download | ruby-5f16a15d5e981bba53a1fb9f9f96dccef09f238e.tar.gz ruby-5f16a15d5e981bba53a1fb9f9f96dccef09f238e.tar.xz ruby-5f16a15d5e981bba53a1fb9f9f96dccef09f238e.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@1819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) { |
