From a6f5f3cccda381ae332aaa6467f2644611371fb5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 9 Feb 2021 10:08:30 +0900 Subject: Also `eclass` loop can raise in `rb_obj_is_kind_of` --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 56d7c2b81c..2c9e375e25 100644 --- a/eval.c +++ b/eval.c @@ -1034,6 +1034,7 @@ rb_vrescue2(VALUE (* b_proc) (VALUE), VALUE data1, int handle = FALSE; VALUE eclass; + result = Qnil; while ((eclass = va_arg(args, VALUE)) != 0) { if (rb_obj_is_kind_of(ec->errinfo, eclass)) { handle = TRUE; @@ -1042,7 +1043,6 @@ rb_vrescue2(VALUE (* b_proc) (VALUE), VALUE data1, } if (handle) { - result = Qnil; state = TAG_NONE; if (r_proc) { result = (*r_proc) (data2, ec->errinfo); -- cgit v1.2.1