diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c index 1cc568b69f..00e03e94ee 100644 --- a/ext/date/date_strptime.c +++ b/ext/date/date_strptime.c @@ -529,24 +529,24 @@ date__strptime_internal(const char *str, size_t slen, goto matched; case 'Y': - { - VALUE n; - int sign = 1; + { + VALUE n; + int sign = 1; - if (issign(str[si])) { - if (str[si] == '-') - sign = -1; - si++; - } - if (NUM_PATTERN_P()) - READ_DIGITS(n, 4); - else - READ_DIGITS_MAX(n); - if (sign == -1) - n = f_negate(n); - set_hash("year", n); - goto matched; - } + if (issign(str[si])) { + if (str[si] == '-') + sign = -1; + si++; + } + if (NUM_PATTERN_P()) + READ_DIGITS(n, 4); + else + READ_DIGITS_MAX(n); + if (sign == -1) + n = f_negate(n); + set_hash("year", n); + goto matched; + } case 'y': {