1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

don't use goto.

* vm_trace.c (rb_exec_event_hooks): we don't need to use goto statement.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-11-17 07:47:03 +00:00
parent 114fc2201c
commit 8a664f0c96

View file

@ -358,15 +358,11 @@ rb_exec_event_hooks(rb_trace_arg_t *trace_arg, int pop_p)
ec->local_storage_recursive_hash = ec->local_storage_recursive_hash_for_trace;
ec->errinfo = Qnil;
ec->trace_arg = trace_arg;
{
state = exec_hooks_protected(ec, vm, &vm->event_hooks, trace_arg);
if (state) goto terminate;
state = exec_hooks_protected(ec, vm, &vm->event_hooks, trace_arg);
if (!state) {
ec->errinfo = errinfo;
}
terminate:
ec->trace_arg = NULL;
ec->local_storage_recursive_hash_for_trace = ec->local_storage_recursive_hash;