ruby-changes:48706
From: ko1 <ko1@a...>
Date: Fri, 17 Nov 2017 16:47:09 +0900 (JST)
Subject: [ruby-changes:48706] ko1:r60822 (trunk): don't use `goto`.
ko1 2017-11-17 16:47:03 +0900 (Fri, 17 Nov 2017) New Revision: 60822 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60822 Log: don't use `goto`. * vm_trace.c (rb_exec_event_hooks): we don't need to use goto statement. Modified files: trunk/vm_trace.c Index: vm_trace.c =================================================================== --- vm_trace.c (revision 60821) +++ vm_trace.c (revision 60822) @@ -358,15 +358,11 @@ rb_exec_event_hooks(rb_trace_arg_t *trac https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L358 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/