1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing

preceeding 0s.  [ruby-core:13873]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-12-04 02:23:52 +00:00
parent 08494c8643
commit 80644b31d5
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Tue Dec 4 11:23:50 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing
preceeding 0s. [ruby-core:13873]
Mon Dec 3 11:51:53 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/Win32API/*: removed or moved to ext/dl/win32.

View file

@ -472,7 +472,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
}
if (*str == '0') { /* squeeze preceeding 0s */
while (*++str == '0');
if (!*str) --str;
if (!(c = *str) || ISSPACE(c)) --str;
}
c = *str;
c = conv_digit(c);

View file

@ -667,5 +667,8 @@ class TestInteger < Test::Unit::TestCase
assert_raise(ArgumentError) { Integer("4611686018427387904 :") }
assert_equal(0x4000000000000000, Integer("46_11_686_0184273_87904"))
assert_raise(ArgumentError) { Integer("\0") }
assert_nothing_raised(ArgumentError, "[ruby-core:13873]") {
assert_equal(0, Integer("0 "))
}
end
end

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-12-03"
#define RUBY_RELEASE_DATE "2007-12-04"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20071203
#define RUBY_RELEASE_CODE 20071204
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 12
#define RUBY_RELEASE_DAY 3
#define RUBY_RELEASE_DAY 4
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];