summaryrefslogtreecommitdiff
path: root/ruby_1_9_3/ext/-test-/bug-3571/bug.c
blob: 72d6bd10219fc5f970b869afdee62ff0d382fa21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <ruby.h>

static VALUE
bug_i(VALUE i, VALUE 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);
}