mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r29073 from trunk into ruby_1_9_2.
-- * util.c (ruby_strtod): make sure to have digit-sequence after 'p' for hexadecimal-floating-constant. [ruby-dev:42105] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
96f0473ef6
commit
ace1ad2607
4 changed files with 14 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Mon Aug 23 02:23:05 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* util.c (ruby_strtod): make sure to have digit-sequence after 'p'
|
||||
for hexadecimal-floating-constant. [ruby-dev:42105]
|
||||
|
||||
Sun Aug 22 09:08:02 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/ruby.h (UINT2NUM): fix ifdef condition for LLP64.
|
||||
|
|
|
|||
|
|
@ -429,6 +429,8 @@ class TestFloat < Test::Unit::TestCase
|
|||
assert_equal(1, Float(([1] * 10000).join).infinite?)
|
||||
assert(!Float(([1] * 10000).join("_")).infinite?) # is it really OK?
|
||||
assert_raise(ArgumentError) { Float("1.0\x001") }
|
||||
assert_equal(15.9375, Float('0xf.fp0'))
|
||||
assert_raise(ArgumentError) { Float('0xf.fp') }
|
||||
assert_equal(1, Float("1e10_00").infinite?)
|
||||
assert_raise(TypeError) { Float(nil) }
|
||||
o = Object.new
|
||||
|
|
|
|||
8
util.c
8
util.c
|
|
@ -2139,11 +2139,15 @@ break2:
|
|||
if (abs(dsign) == 1) s++;
|
||||
else dsign = 1;
|
||||
|
||||
for (nd = 0; (c = *s) >= '0' && c <= '9'; s++) {
|
||||
nd = 0;
|
||||
c = *s;
|
||||
if (c < '0' || '9' < c) goto ret0;
|
||||
do {
|
||||
nd *= 10;
|
||||
nd += c;
|
||||
nd -= '0';
|
||||
}
|
||||
c = *++s;
|
||||
} while ('0' <= c && c <= '9');
|
||||
dval(rv) = ldexp(adj, nd * dsign);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "1.9.2"
|
||||
#define RUBY_RELEASE_DATE "2010-09-29"
|
||||
#define RUBY_PATCHLEVEL 6
|
||||
#define RUBY_PATCHLEVEL 7
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue