From 331fea278b05d4ef32c271d000192288f505f494 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 27 Oct 2016 07:27:20 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ object.c | 9 ++++++--- version.h | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a55798fe5..bd6047e2cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 27 16:27:06 2016 SHIBATA Hiroshi + + * object.c: Improve documentation for Float conversion. + [ruby-core:71661][Bug #11736][ci skip] + Fri Oct 7 02:44:57 2016 NAKAMURA Usaku * lib/rubygems/ssl_certs/GlobalSignRootCA.pem: add for RubyGems.org. diff --git a/object.c b/object.c index fe7b6f9be8..1addc92717 100644 --- a/object.c +++ b/object.c @@ -2953,11 +2953,14 @@ rb_Float(VALUE val) * Float(arg) -> float * * Returns arg converted to a float. Numeric types are converted - * directly, the rest are converted using arg.to_f. + * directly, and with exception to string and nil the rest are converted using arg.to_f. + * Converting a string with invalid characters will result in a ArgumentError. * Converting nil generates a TypeError. * - * 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 diff --git a/version.h b/version.h index eea3722e16..1d94105700 100644 --- a/version.h +++ b/version.h @@ -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" -- cgit v1.2.3