aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index feb543d461..783335d9d9 100644
--- a/eval.c
+++ b/eval.c
@@ -145,6 +145,9 @@ ruby_cleanup(volatile int ex)
th->errinfo = errs[1];
ex = error_handle(ex);
ruby_finalize_1();
+
+ /* unlock again if finalizer took mutexes. */
+ rb_threadptr_unlock_all_locking_mutexes(GET_THREAD());
POP_TAG();
rb_thread_stop_timer_thread(1);