summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-15 08:49:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-15 08:49:23 +0000
commitbe256c6f5a0180ac3eef05075f8b3977d29dfcb7 (patch)
tree80b8fb91a7a668c70f42757bfc8d563bf63242ba /eval.c
parent91fdbecbdaa25387e19050dbf9234d245c8246b8 (diff)
* array.c (rb_ary_and): should not push frozen key string.
* array.c (rb_ary_or): ditto. * eval.c (rb_thread_schedule): should save context before raising deadlock, saved context for current thread might be obsolete. * time.c (make_time_t): non DST timezone shift supported (hopefully). * signal.c: SIGINFO added. * eval.c (rb_ensure): should not SEGV when prot_tag is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index f9a0bdd595..da2f1888d6 100644
--- a/eval.c
+++ b/eval.c
@@ -3991,9 +3991,9 @@ rb_ensure(b_proc, data1, e_proc, data2)
result = (*b_proc)(data1);
}
POP_TAG();
- retval = prot_tag->retval; /* save retval */
+ retval = prot_tag ? prot_tag->retval : Qnil; /* save retval */
(*e_proc)(data2);
- return_value(retval);
+ if (prot_tag) return_value(retval);
if (state) JUMP_TAG(state);
return result;
@@ -7538,6 +7538,7 @@ rb_thread_schedule()
next->gid = 0;
rb_thread_ready(next);
next->status = THREAD_TO_KILL;
+ rb_thread_save_context(curr_thread);
rb_thread_deadlock();
}
next->wait_for = 0;