summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 14:58:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 14:58:33 +0000
commit770128ade36db597395630f861fd9d801428ef2b (patch)
treedb49a515b7f1b7d030a763d17fd2f352ea435c67 /ext/-test-
parent71c8cf27dbf049aa8e91550ae0b04bc1bca6ee3f (diff)
test_bmethod.rb: block in bmethod test
* test/-ext-/proc/test_bmethod.rb (test_super_in_bmethod): block in bmethod test for [Feature #10195]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/proc/call_super.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/-test-/proc/call_super.c b/ext/-test-/proc/call_super.c
index c5cb3eb..c1f3088 100644
--- a/ext/-test-/proc/call_super.c
+++ b/ext/-test-/proc/call_super.c
@@ -1,12 +1,17 @@
#include "ruby.h"
static VALUE
-bug_proc_call_super(VALUE yieldarg, VALUE procarg)
+bug_proc_call_super(RB_BLOCK_CALL_FUNC_ARGLIST(yieldarg, procarg))
{
VALUE args[2];
+ VALUE ret;
args[0] = yieldarg;
args[1] = procarg;
- return rb_call_super(2, args);
+ ret = rb_call_super(2, args);
+ if (!NIL_P(blockarg)) {
+ ret = rb_proc_call(blockarg, ret);
+ }
+ return ret;
}
static VALUE