mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
object.c: Backport #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
This commit is contained in:
parent
9eb9ad0608
commit
2c0b73f16a
3 changed files with 8 additions and 8 deletions
|
@ -1,7 +1,11 @@
|
||||||
|
Wed Jun 23 02:07:00 Kirk Haines <khaines@ruby-lang.org>
|
||||||
|
|
||||||
|
* object.c: Backport #2364 [ruby-core:26733]; Allow result of to_f to be NaN to permit conversion from BigDecimal('NaN') to Float.
|
||||||
|
|
||||||
Tue Jun 22 04:29:00 Kirk Haines <khaines@ruby-lang.org>
|
Tue Jun 22 04:29:00 Kirk Haines <khaines@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c: Bug #1886 [ruby-core:24767]; ensure that rb_exc_raise and rb_exc_fatal require an exception object. Backport of r24403.
|
* eval.c: Bug #1886 [ruby-core:24767]; ensure that rb_exc_raise and rb_exc_fatal require an exception object. Backport of r24403. r28374
|
||||||
* test/ruby/test_exception.rb: test for exception change. Backport of r24404.
|
* test/ruby/test_exception.rb: test for exception change. Backport of r24404. r28374
|
||||||
|
|
||||||
Sat Jun 12 07:34:00 Kirk Haines <khaines@ruby-lang.org>
|
Sat Jun 12 07:34:00 Kirk Haines <khaines@ruby-lang.org>
|
||||||
|
|
||||||
|
|
6
object.c
6
object.c
|
@ -2386,11 +2386,7 @@ rb_Float(val)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
|
return rb_convert_type(val, T_FLOAT, "Float", "to_f");
|
||||||
if (isnan(RFLOAT(f)->value)) {
|
|
||||||
rb_raise(rb_eArgError, "invalid value for Float()");
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define RUBY_RELEASE_DATE "2010-06-23"
|
#define RUBY_RELEASE_DATE "2010-06-23"
|
||||||
#define RUBY_VERSION_CODE 186
|
#define RUBY_VERSION_CODE 186
|
||||||
#define RUBY_RELEASE_CODE 20100623
|
#define RUBY_RELEASE_CODE 20100623
|
||||||
#define RUBY_PATCHLEVEL 416
|
#define RUBY_PATCHLEVEL 417
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 8
|
#define RUBY_VERSION_MINOR 8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue