diff --git a/ChangeLog b/ChangeLog index 815ef65e5e..2f5a975891 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Nov 12 01:05:45 2016 SHIBATA Hiroshi + + * object.c: Improve documentation for Float conversion. + [ruby-core:71661][Bug #11736][ci skip] + Sat Nov 12 00:50:35 2016 Nobuyoshi Nakada * proc.c (mnew_internal): follow the original class, not to loop diff --git a/object.c b/object.c index 3c502d5c0f..58d9c23ea1 100644 --- a/object.c +++ b/object.c @@ -2943,11 +2943,14 @@ FUNC_MINIMIZED(static VALUE rb_f_float(VALUE obj, VALUE arg)); * 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 ab7b0add78..ce8ea003c6 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #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