Permalink
Browse files

* 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 379fa42 commit 100d0a568eeac44c8844a3a8707a1faa460f5106 @ko1 ko1 committed Aug 29, 2008
Showing with 21 additions and 13 deletions.
  1. +7 −0 ChangeLog
  2. +0 −11 KNOWNBUGS.rb
  3. +11 −0 bootstraptest/test_method.rb
  4. +3 −2 vm_insnhelper.c
View
@@ -1,3 +1,10 @@
+Fri Aug 29 16:48:34 2008 Koichi Sasada <ko1@atdot.net>
+
+ * 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@ruby-lang.org>
* ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): fix for
View
@@ -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]'
@@ -1058,3 +1058,14 @@ def bar
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]'
View
@@ -518,9 +518,10 @@ vm_call_method(rb_thread_t * const th, rb_control_frame_t * const cfp,
break;
}
case NODE_BMETHOD:{
- VALUE *argv = cfp->sp - num;
- val = vm_call_bmethod(th, id, node->nd_cval, recv, klass, num, argv, blockptr);
+ 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);
break;
}
case NODE_ZSUPER:{

0 comments on commit 100d0a5

Please sign in to comment.