summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-28 19:28:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-02 01:35:45 +0900
commitc0dc717c45fc3abc64a337c3481bc4555b675d87 (patch)
tree9b319eabb00659bed4d57b1afa5ba58e7932ba79 /complex.c
parent914cf26d6e65307910854723964e75edaa748377 (diff)
[Bug #19087] Disallow successive underscores in Complex string
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6645
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/complex.c b/complex.c
index e9981863c2..57962f9013 100644
--- a/complex.c
+++ b/complex.c
@@ -1751,9 +1751,9 @@ read_digits(const char **s, int strict,
while (isdecimal(**s) || **s == '_') {
if (**s == '_') {
- if (strict) {
- if (us)
- return 0;
+ if (us) {
+ if (strict) return 0;
+ break;
}
us = 1;
}