aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-04-22 10:44:52 +0900
committerKoichi Sasada <ko1@atdot.net>2021-04-22 11:33:39 +0900
commit609de71f043e8ba34f22b9993e444e2e5bb05709 (patch)
tree531d2d941add4c819ad975fb4d26b6e2b2d771bf /iseq.h
parent5512353d97250e85c13bf10b9b32e750478cf474 (diff)
downloadruby-609de71f043e8ba34f22b9993e444e2e5bb05709.tar.gz
fix raise in exception with jump
add_ensure_iseq() adds ensure block to the end of jump such as next/redo/return. However, if the rescue cause are in the body, this rescue catches the exception in ensure clause. iter do next rescue R ensure raise end In this case, R should not be executed, but executed without this patch. Fixes [Bug #13930] Fixes [Bug #16618] A part of tests are written by @jeremyevans https://github.com/ruby/ruby/pull/4291
Diffstat (limited to 'iseq.h')
-rw-r--r--iseq.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/iseq.h b/iseq.h
index 6a6c69a114..904b891427 100644
--- a/iseq.h
+++ b/iseq.h
@@ -101,6 +101,7 @@ struct iseq_compile_data {
struct iseq_compile_data_storage *storage_head;
struct iseq_compile_data_storage *storage_current;
} insn;
+ bool in_rescue;
int loopval_popped; /* used by NODE_BREAK */
int last_line;
int label_no;