[前][次][番号順一覧][スレッド一覧]

ruby-changes:44428

From: usa <ko1@a...>
Date: Thu, 27 Oct 2016 16:27:25 +0900 (JST)
Subject: [ruby-changes:44428] usa:r56501 (ruby_2_2): merge revision(s) 56421, 56422: [Backport #11736]

usa	2016-10-27 16:27:20 +0900 (Thu, 27 Oct 2016)

  New Revision: 56501

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56501

  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_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/object.c
    branches/ruby_2_2/version.h
Index: ruby_2_2/object.c
===================================================================
--- ruby_2_2/object.c	(revision 56500)
+++ ruby_2_2/object.c	(revision 56501)
@@ -2953,11 +2953,14 @@ rb_Float(VALUE val) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/object.c#L2953
  *     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_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 56500)
+++ ruby_2_2/version.h	(revision 56501)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #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"
 
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 56500)
+++ ruby_2_2/ChangeLog	(revision 56501)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Thu Oct 27 16:27:06 2016  SHIBATA Hiroshi  <hsbt@r...>
+
+	* object.c: Improve documentation for Float conversion.
+	  [ruby-core:71661][Bug #11736][ci skip]
+
 Fri Oct  7 02:44:57 2016  NAKAMURA Usaku  <usa@r...>
 
 	* lib/rubygems/ssl_certs/GlobalSignRootCA.pem: add for RubyGems.org.

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r56421-56422


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]