From a5ae9aebbc3d373d664747e5bfac5f47d3ac4102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 18 Jun 2020 16:44:49 +0900 Subject: [PATCH] trnext: do not goto into a branch I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index c7be097b49..60ee2a5fa3 100644 --- a/string.c +++ b/string.c @@ -7119,8 +7119,8 @@ trnext(struct tr *t, rb_encoding *enc) int n; for (;;) { + nextpart: if (!t->gen) { -nextpart: if (t->p == t->pend) return -1; if (rb_enc_ascget(t->p, t->pend, &n, enc) == '\\' && t->p + n < t->pend) { t->p += n;