Skip to content

Commit 2c0b73f

Browse files
author
wyhaines
committed
object.c: Backport ruby#2364 [ruby-core:26733]; Allow result of to_f to be NaN to permit conversion from BigDecimal('NaN') to Float.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 9eb9ad0 commit 2c0b73f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

ChangeLog

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
Wed Jun 23 02:07:00 Kirk Haines <khaines@ruby-lang.org>
2+
3+
* object.c: Backport #2364 [ruby-core:26733]; Allow result of to_f to be NaN to permit conversion from BigDecimal('NaN') to Float.
4+
15
Tue Jun 22 04:29:00 Kirk Haines <khaines@ruby-lang.org>
26

3-
* eval.c: Bug #1886 [ruby-core:24767]; ensure that rb_exc_raise and rb_exc_fatal require an exception object. Backport of r24403.
4-
* test/ruby/test_exception.rb: test for exception change. Backport of r24404.
7+
* eval.c: Bug #1886 [ruby-core:24767]; ensure that rb_exc_raise and rb_exc_fatal require an exception object. Backport of r24403. r28374
8+
* test/ruby/test_exception.rb: test for exception change. Backport of r24404. r28374
59

610
Sat Jun 12 07:34:00 Kirk Haines <khaines@ruby-lang.org>
711

object.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,11 +2386,7 @@ rb_Float(val)
23862386

23872387
default:
23882388
{
2389-
VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
2390-
if (isnan(RFLOAT(f)->value)) {
2391-
rb_raise(rb_eArgError, "invalid value for Float()");
2392-
}
2393-
return f;
2389+
return rb_convert_type(val, T_FLOAT, "Float", "to_f");
23942390
}
23952391
}
23962392
}

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2010-06-23"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20100623
5-
#define RUBY_PATCHLEVEL 416
5+
#define RUBY_PATCHLEVEL 417
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy