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

ruby-changes:32247

From: nagachika <ko1@a...>
Date: Sun, 22 Dec 2013 00:17:51 +0900 (JST)
Subject: [ruby-changes:32247] nagachika:r44326 (ruby_2_0_0): merge revision(s) 44127: [Backport #9238]

nagachika	2013-12-22 00:17:42 +0900 (Sun, 22 Dec 2013)

  New Revision: 44326

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

  Log:
    merge revision(s) 44127: [Backport #9238]
    
    * insns.def: Fix optimization bug of Float#/ [Bug #9238]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/insns.def
    branches/ruby_2_0_0/test/ruby/test_optimization.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 44325)
+++ ruby_2_0_0/ChangeLog	(revision 44326)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Dec 22 00:07:09 2013  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* insns.def: Fix optimization bug of Float#/ [Bug #9238]
+
 Sat Dec 21 23:13:55 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval_jump.c (rb_exec_end_proc): unlink and free procs data before
Index: ruby_2_0_0/insns.def
===================================================================
--- ruby_2_0_0/insns.def	(revision 44325)
+++ ruby_2_0_0/insns.def	(revision 44326)
@@ -1491,7 +1491,7 @@ opt_div https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/insns.def#L1491
 	val = LONG2NUM(div);
     }
     else if (FLONUM_2_P(recv, obj) &&
-	     BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
+	     BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
 	val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
     }
     else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 44325)
+++ ruby_2_0_0/version.h	(revision 44326)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
-#define RUBY_RELEASE_DATE "2013-12-21"
-#define RUBY_PATCHLEVEL 369
+#define RUBY_RELEASE_DATE "2013-12-22"
+#define RUBY_PATCHLEVEL 370
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 21
+#define RUBY_RELEASE_DAY 22
 
 #include "ruby/version.h"
 
Index: ruby_2_0_0/test/ruby/test_optimization.rb
===================================================================
--- ruby_2_0_0/test/ruby/test_optimization.rb	(revision 44325)
+++ ruby_2_0_0/test/ruby/test_optimization.rb	(revision 44326)
@@ -67,6 +67,7 @@ class TestRubyOptimization < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_optimization.rb#L67
 
   def test_fixnum_div
     assert_equal 3, 15 / 5
+    assert_equal 6.66, redefine_method('Float', '/') { 4.2 / 6.66 }, "bug 9238"
   end
 
   def test_fixnum_mod

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r44127


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

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