1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/-test-/bug-3571/bug.c
nobu 7566c49068 ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLIST
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
  argument list of rb_block_call_func.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 07:59:14 +00:00

23 lines
436 B
C

#include <ruby.h>
static VALUE
bug_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg))
{
rb_notimplement();
return ID2SYM(rb_frame_this_func());
}
static VALUE
bug_start(VALUE self, VALUE hash)
{
VALUE ary = rb_ary_new3(1, Qnil);
rb_block_call(ary, rb_intern("map"), 0, 0, bug_i, self);
return ary;
}
void
Init_bug(void)
{
VALUE mBug = rb_define_module("Bug");
rb_define_module_function(mBug, "start", bug_start, 0);
}