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

ruby-changes:16657

From: mame <ko1@a...>
Date: Thu, 15 Jul 2010 22:18:38 +0900 (JST)
Subject: [ruby-changes:16657] Ruby:r28653 (ruby_1_9_2): merges r28652 from trunk into ruby_1_9_2.

mame	2010-07-15 22:18:15 +0900 (Thu, 15 Jul 2010)

  New Revision: 28653

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28653

  Log:
    merges r28652 from trunk into ruby_1_9_2.
    --
    * numeric.c (fix_divide): must not use rb_rational_new1 for coercion
      because it returns an argument itself when canonical mode is set.
      [ruby-core:31279]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/numeric.c

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28652)
+++ ruby_1_9_2/ChangeLog	(revision 28653)
@@ -1,3 +1,9 @@
+Thu Jul 15 21:43:35 2010  Yusuke Endoh  <mame@t...>
+
+	* numeric.c (fix_divide): must not use rb_rational_new1 for coercion
+	  because it returns an argument itself when canonical mode is set.
+	  [ruby-core:31279]
+
 Thu Jul 15 21:38:31 2010  Yusuke Endoh  <mame@t...>
 
 	* proc.c (bm_free): fix memory leak.  [ruby-core:30869] [Bug #3466]
Index: ruby_1_9_2/numeric.c
===================================================================
--- ruby_1_9_2/numeric.c	(revision 28652)
+++ ruby_1_9_2/numeric.c	(revision 28653)
@@ -2422,7 +2422,7 @@
       case T_RATIONAL:
 	if (op == '/' && FIX2LONG(x) == 1)
 	    return rb_rational_reciprocal(y);
-	return rb_funcall(rb_rational_new1(x), op, 1, y);
+	/* fall through */
       default:
 	return rb_num_coerce_bin(x, y, op);
     }

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

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