diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | object.c | 9 | ||||
-rw-r--r-- | version.h | 6 |
3 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,8 @@ +Thu Oct 27 16:27:06 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org> + + * object.c: Improve documentation for Float conversion. + [ruby-core:71661][Bug #11736][ci skip] + Fri Oct 7 02:44:57 2016 NAKAMURA Usaku <usa@ruby-lang.org> * lib/rubygems/ssl_certs/GlobalSignRootCA.pem: add for RubyGems.org. @@ -2953,11 +2953,14 @@ rb_Float(VALUE val) * 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 @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.2.6" -#define RUBY_RELEASE_DATE "2016-10-07" -#define RUBY_PATCHLEVEL 380 +#define RUBY_RELEASE_DATE "2016-10-27" +#define RUBY_PATCHLEVEL 381 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 10 -#define RUBY_RELEASE_DAY 7 +#define RUBY_RELEASE_DAY 27 #include "ruby/version.h" |