From b18fd23cefac6f94a0d3b565a2e012c95dea2486 Mon Sep 17 00:00:00 2001 From: dearblue Date: Fri, 23 Apr 2021 22:54:12 +0900 Subject: Avoid ill-advised `goto` ref #5362 --- mrbgems/mruby-binding-core/src/binding-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mrbgems/mruby-binding-core/src/binding-core.c b/mrbgems/mruby-binding-core/src/binding-core.c index 209da8bf9..1454f5945 100644 --- a/mrbgems/mruby-binding-core/src/binding-core.c +++ b/mrbgems/mruby-binding-core/src/binding-core.c @@ -188,10 +188,8 @@ binding_source_location(mrb_state *mrb, mrb_value self) if (!proc || MRB_PROC_CFUNC_P(proc) || !proc->upper || MRB_PROC_CFUNC_P(proc->upper)) { srcloc = mrb_nil_value(); - goto cache_source_location; } - - { + else { const mrb_irep *irep = proc->upper->body.irep; mrb_int pc = binding_extract_pc(mrb, self); if (pc < 0) { @@ -210,7 +208,6 @@ binding_source_location(mrb_state *mrb, mrb_value self) } } -cache_source_location: if (!mrb_frozen_p(mrb_obj_ptr(self))) { mrb_iv_set(mrb, self, MRB_SYM(source_location), srcloc); } -- cgit v1.2.3