diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-18 16:44:49 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-29 11:05:41 +0900 |
commit | a5ae9aebbc3d373d664747e5bfac5f47d3ac4102 (patch) | |
tree | a18a9250d1e6b7a6fc15f19cf178828fe662e964 /string.c | |
parent | c7a40731549ce0dd6b52af512ebc0c588bce05f4 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |