ruby-changes:16409
From: wyhaines <ko1@a...>
Date: Wed, 23 Jun 2010 02:18:23 +0900 (JST)
Subject: [ruby-changes:16409] Ruby:r28392 (ruby_1_8_6): object.c: Backport #2364 ; Allow result of to_f to be NaN to permit conversion from BigDecimal('NaN') to Float.
wyhaines 2010-06-23 02:18:04 +0900 (Wed, 23 Jun 2010) New Revision: 28392 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28392 Log: object.c: Backport #2364 [ruby-core:26733]; Allow result of to_f to be NaN to permit conversion from BigDecimal('NaN') to Float. Modified files: branches/ruby_1_8_6/ChangeLog branches/ruby_1_8_6/object.c branches/ruby_1_8_6/version.h Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 28391) +++ ruby_1_8_6/ChangeLog (revision 28392) @@ -1,7 +1,11 @@ +Wed Jun 23 02:07:00 Kirk Haines <khaines@r...> + + * 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@r...> - * eval.c: Bug #1886 [ruby-core:24767]; ensure that rb_exc_raise and rb_exc_fatal require an exception object. Backport of r24403. - * test/ruby/test_exception.rb: test for exception change. Backport of r24404. + * 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. r28374 Sat Jun 12 07:34:00 Kirk Haines <khaines@r...> Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 28391) +++ ruby_1_8_6/version.h (revision 28392) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2010-06-23" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20100623 -#define RUBY_PATCHLEVEL 416 +#define RUBY_PATCHLEVEL 417 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_6/object.c =================================================================== --- ruby_1_8_6/object.c (revision 28391) +++ ruby_1_8_6/object.c (revision 28392) @@ -2386,11 +2386,7 @@ default: { - VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f"); - if (isnan(RFLOAT(f)->value)) { - rb_raise(rb_eArgError, "invalid value for Float()"); - } - return f; + return rb_convert_type(val, T_FLOAT, "Float", "to_f"); } } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/