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): an underscore succeeding after octal

prefix is allowed.  [ruby-core:14139]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-12-19 01:52:31 +00:00
parent 5367386d10
commit 2bd1fa4ace
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Wed Dec 19 10:52:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bignum.c (rb_cstr_to_inum): an underscore succeeding after octal
prefix is allowed. [ruby-core:14139]
Mon Dec 17 13:43:15 2007 Tanaka Akira <akr@fsij.org>
* gc.c (stack_end_address): use local variable address instead of

View file

@ -416,7 +416,7 @@ rb_cstr_to_inum(str, base, badcheck)
len = 2;
break;
case 8:
if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) {
if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O'||str[1] == '_')) {
str += 2;
}
case 4: case 5: case 6: case 7:

View file

@ -645,5 +645,8 @@ class TestInteger < Test::Unit::TestCase
assert_nothing_raised(ArgumentError, "[ruby-core:13873]") {
assert_equal(0, Integer("0 "))
}
assert_nothing_raised(ArgumentError, "[ruby-core:14139]") {
assert_equal(0377, Integer("0_3_7_7"))
}
end
end

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.6"
#define RUBY_RELEASE_DATE "2007-12-17"
#define RUBY_RELEASE_DATE "2007-12-19"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20071217
#define RUBY_RELEASE_CODE 20071219
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 12
#define RUBY_RELEASE_DAY 17
#define RUBY_RELEASE_DAY 19
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];