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

ruby-changes:7399

From: ko1 <ko1@a...>
Date: Fri, 29 Aug 2008 17:25:08 +0900 (JST)
Subject: [ruby-changes:7399] Ruby:r18918 (trunk): * vm_insnhelper.c (vm_call_method): copy arguments to allocated

ko1	2008-08-29 17:24:51 +0900 (Fri, 29 Aug 2008)

  New Revision: 18918

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

  Log:
    * vm_insnhelper.c (vm_call_method): copy arguments to allocated
      memory from machine stack.  [ruby-dev:36028]
    * KNOWNBUGS.rb, bootstraptest/test_method.rb: move fixed test.

  Modified files:
    trunk/ChangeLog
    trunk/KNOWNBUGS.rb
    trunk/bootstraptest/test_method.rb
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18917)
+++ ChangeLog	(revision 18918)
@@ -1,3 +1,10 @@
+Fri Aug 29 16:48:34 2008  Koichi Sasada  <ko1@a...>
+
+	* vm_insnhelper.c (vm_call_method): copy arguments to allocated
+	  memory from machine stack.  [ruby-dev:36028]
+
+	* KNOWNBUGS.rb, bootstraptest/test_method.rb: move fixed test.
+
 Fri Aug 29 12:19:12 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): fix for
Index: bootstraptest/test_method.rb
===================================================================
--- bootstraptest/test_method.rb	(revision 18917)
+++ bootstraptest/test_method.rb	(revision 18918)
@@ -1058,3 +1058,14 @@
   D.new.bar{}
   [C.new.foo, C.new.foo{}, D.new.m1, D.new.m1{}, D.new.m2, D.new.m2{}]
 }, '[ruby-core:14813]'
+
+assert_equal 'ok', %q{
+  class Foo
+    define_method(:foo) do |&b|
+      b.call
+    end
+  end
+  Foo.new.foo do
+    break :ok
+  end
+}, '[ruby-dev:36028]'
Index: KNOWNBUGS.rb
===================================================================
--- KNOWNBUGS.rb	(revision 18917)
+++ KNOWNBUGS.rb	(revision 18918)
@@ -2,14 +2,3 @@
 # This test file concludes tests which point out known bugs.
 # So all tests will cause failure.
 #
-
-assert_equal 'ok', %q{
-  class Foo
-    define_method(:foo) do |&b|
-      b.call
-    end
-  end
-  Foo.new.foo do
-    break :ok
-  end
-}, '[ruby-dev:36028]'
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 18917)
+++ vm_insnhelper.c	(revision 18918)
@@ -518,9 +518,10 @@
 		break;
 	      }
 	      case NODE_BMETHOD:{
-		VALUE *argv = cfp->sp - num;
+		VALUE *argv = ALLOCA_N(VALUE, num);
+		MEMCPY(argv, cfp->sp - num, VALUE, num);
+		cfp->sp += - num - 1;
 		val = vm_call_bmethod(th, id, node->nd_cval, recv, klass, num, argv, blockptr);
-		cfp->sp += - num - 1;
 		break;
 	      }
 	      case NODE_ZSUPER:{

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

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