mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 57269,57277:
bignum.c: fix rb_cstr_parse_inum endp * bignum.c (rb_cstr_parse_inum): stores the address of the first invalid character when str is too big or contains an underscore. bignum.c: unnecessary check * bignum.c (rb_cstr_parse_inum): remove unnecessary check. successive sign is rejected by conv_digit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b85d2e8a5a
commit
af41ce23ea
2 changed files with 2 additions and 4 deletions
4
bignum.c
4
bignum.c
|
@ -4057,9 +4057,6 @@ rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base)
|
|||
sign = 0;
|
||||
}
|
||||
ASSERT_LEN();
|
||||
if (str[0] == '+' || str[0] == '-') {
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
if (base <= 0) {
|
||||
if (str[0] == '0' && len > 1) {
|
||||
|
@ -4172,6 +4169,7 @@ rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base)
|
|||
digits_start = str;
|
||||
if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
|
||||
goto bad;
|
||||
if (endp) *endp = (char *)(str + len);
|
||||
digits_end = digits_start + len;
|
||||
|
||||
if (POW2_P(base)) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "2.4.0"
|
||||
#define RUBY_RELEASE_DATE "2017-03-13"
|
||||
#define RUBY_PATCHLEVEL 98
|
||||
#define RUBY_PATCHLEVEL 99
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2017
|
||||
#define RUBY_RELEASE_MONTH 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue