1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_yield_0): restore source file/line after yield.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-01-23 07:24:26 +00:00
parent 68f6704478
commit 9ffccf4762
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Jan 23 13:27:44 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* eval.c (rb_yield_0): restore source file/line after yield.
Mon Jan 21 22:57:18 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* signal.c (ruby_signal): must define sighandler_t unless

4
eval.c
View file

@ -3670,6 +3670,8 @@ rb_yield_0(val, self, klass, pcall)
struct BLOCK * volatile block;
struct SCOPE * volatile old_scope;
struct FRAME frame;
char *const file = ruby_sourcefile;
int line = ruby_sourceline;
int state;
static unsigned serial = 1;
@ -3794,6 +3796,8 @@ rb_yield_0(val, self, klass, pcall)
if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
scope_dup(old_scope);
ruby_scope = old_scope;
ruby_sourcefile = file;
ruby_sourceline = line;
if (state) {
if (!block->tag) {
switch (state & TAG_MASK) {