diff options
| author | dearblue <[email protected]> | 2021-04-23 22:54:12 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-04-23 22:54:12 +0900 |
| commit | b18fd23cefac6f94a0d3b565a2e012c95dea2486 (patch) | |
| tree | 6c6ce4db43773f56a21a46c7ff405b06eb86aca9 /mrbgems/mruby-binding-core | |
| parent | 39dc7b79014413f4f45f30fc977366b58814ab02 (diff) | |
| download | mruby-b18fd23cefac6f94a0d3b565a2e012c95dea2486.tar.gz mruby-b18fd23cefac6f94a0d3b565a2e012c95dea2486.zip | |
Avoid ill-advised `goto`
ref #5362
Diffstat (limited to 'mrbgems/mruby-binding-core')
| -rw-r--r-- | mrbgems/mruby-binding-core/src/binding-core.c | 5 |
1 files changed, 1 insertions, 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); } |
