summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--eval.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f7662badb..9e6f41a326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 08:25:30 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (ruby_stop): should not trace error handler.
diff --git a/eval.c b/eval.c
index 9a0df065a2..8ec59bf534 100644
--- a/eval.c
+++ b/eval.c
@@ -3533,6 +3533,8 @@ rb_yield_0(val, self, klass, acheck)
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;
@@ -3679,6 +3681,8 @@ rb_yield_0(val, self, klass, acheck)
if (ruby_scope->flag & 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) {