ruby-changes:44649
From: nagachika <ko1@a...>
Date: Sat, 12 Nov 2016 01:06:14 +0900 (JST)
Subject: [ruby-changes:44649] nagachika:r56722 (ruby_2_3): merge revision(s) 56421, 56422: [Backport #11736]
nagachika 2016-11-12 01:06:11 +0900 (Sat, 12 Nov 2016) New Revision: 56722 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56722 Log: merge revision(s) 56421,56422: [Backport #11736] * object.c: Improve documentation for Integer conversion. [ruby-core:71661][Bug #11736][ci skip] * object.c: Improve documentation for Float conversion. Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/object.c branches/ruby_2_3/version.h Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 56721) +++ ruby_2_3/ChangeLog (revision 56722) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Sat Nov 12 01:05:45 2016 SHIBATA Hiroshi <hsbt@r...> + + * object.c: Improve documentation for Float conversion. + [ruby-core:71661][Bug #11736][ci skip] + Sat Nov 12 00:50:35 2016 Nobuyoshi Nakada <nobu@r...> * proc.c (mnew_internal): follow the original class, not to loop Index: ruby_2_3/object.c =================================================================== --- ruby_2_3/object.c (revision 56721) +++ ruby_2_3/object.c (revision 56722) @@ -2943,11 +2943,14 @@ FUNC_MINIMIZED(static VALUE rb_f_float(V https://github.com/ruby/ruby/blob/trunk/ruby_2_3/object.c#L2943 * Float(arg) -> float * * Returns <i>arg</i> converted to a float. Numeric types are converted - * directly, the rest are converted using <i>arg</i>.to_f. + * directly, and with exception to string and nil the rest are converted using <i>arg</i>.to_f. + * Converting a <code>string</code> with invalid characters will result in a <code>ArgumentError</code>. * Converting <code>nil</code> generates a <code>TypeError</code>. * - * Float(1) #=> 1.0 - * Float("123.456") #=> 123.456 + * Float(1) #=> 1.0 + * Float("123.456") #=> 123.456 + * Float("123.0_badstring") #=> ArgumentError: invalid value for Float(): "123.0_badstring" + * Float(nil) #=> TypeError: can't convert nil into Float */ static VALUE Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 56721) +++ ruby_2_3/version.h (revision 56722) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.2" #define RUBY_RELEASE_DATE "2016-11-12" -#define RUBY_PATCHLEVEL 211 +#define RUBY_PATCHLEVEL 212 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 11 Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r56421-56422 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/