ruby-changes:25489
From: mrkn <ko1@a...>
Date: Thu, 8 Nov 2012 09:35:21 +0900 (JST)
Subject: [ruby-changes:25489] mrkn:r37546 (trunk): * numeric.c: Add description of that the results of the comparing
mrkn 2012-11-08 09:34:55 +0900 (Thu, 08 Nov 2012) New Revision: 37546 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37546 Log: * numeric.c: Add description of that the results of the comparing operations of two NaNs are undefined. [#1720] [ruby-dev:38725] [ruby-core:36966] Modified files: trunk/ChangeLog trunk/numeric.c Index: ChangeLog =================================================================== --- ChangeLog (revision 37545) +++ ChangeLog (revision 37546) @@ -1,3 +1,9 @@ +Thu Nov 8 09:34:00 2012 Kenta Murata <mrkn@c...> + + * numeric.c: Add description of that the results of the comparing + operations of two NaNs are undefined. + [#1720] [ruby-dev:38725] [ruby-core:36966] + Thu Nov 8 04:45:21 2012 Marc-Andre Lafortune <ruby-core@m...> * include/ruby/intern.h: Restore rb_enumeratorize as it was before Index: numeric.c =================================================================== --- numeric.c (revision 37545) +++ numeric.c (revision 37546) @@ -1042,6 +1042,8 @@ * Returns <code>true</code> only if <i>obj</i> has the same value * as <i>flt</i>. Contrast this with <code>Float#eql?</code>, which * requires <i>obj</i> to be a <code>Float</code>. + * The result of <code>NaN == NaN</code> is undefined, so the + * implementation-dependent value is returned. * * 1.0 == 1 #=> true * @@ -1109,6 +1111,8 @@ * Returns -1, 0, +1 or nil depending on whether <i>flt</i> is less * than, equal to, or greater than <i>real</i>. This is the basis for * the tests in <code>Comparable</code>. + * The result of <code>NaN <=> NaN</code> is undefined, so the + * implementation-dependent value is returned. */ static VALUE @@ -1153,6 +1157,8 @@ * flt > real -> true or false * * <code>true</code> if <code>flt</code> is greater than <code>real</code>. + * The result of <code>NaN > NaN</code> is undefined, so the + * implementation-dependent value is returned. */ static VALUE @@ -1193,6 +1199,8 @@ * * <code>true</code> if <code>flt</code> is greater than * or equal to <code>real</code>. + * The result of <code>NaN >= NaN</code> is undefined, so the + * implementation-dependent value is returned. */ static VALUE @@ -1232,6 +1240,8 @@ * flt < real -> true or false * * <code>true</code> if <code>flt</code> is less than <code>real</code>. + * The result of <code>NaN < NaN</code> is undefined, so the + * implementation-dependent value is returned. */ static VALUE @@ -1272,6 +1282,8 @@ * * <code>true</code> if <code>flt</code> is less than * or equal to <code>real</code>. + * The result of <code>NaN <= NaN</code> is undefined, so the + * implementation-dependent value is returned. */ static VALUE @@ -1313,6 +1325,8 @@ * Returns <code>true</code> only if <i>obj</i> is a * <code>Float</code> with the same value as <i>flt</i>. Contrast this * with <code>Float#==</code>, which performs type conversions. + * The result of <code>NaN.eql?(NaN)</code> is undefined, so the + * implementation-dependent value is returned. * * 1.0.eql?(1) #=> false */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/