diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/ext/-test-/bug-3571/bug.c |
Fresh start
Diffstat (limited to 'jni/ruby/ext/-test-/bug-3571/bug.c')
-rw-r--r-- | jni/ruby/ext/-test-/bug-3571/bug.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/jni/ruby/ext/-test-/bug-3571/bug.c b/jni/ruby/ext/-test-/bug-3571/bug.c new file mode 100644 index 0000000..87a5df0 --- /dev/null +++ b/jni/ruby/ext/-test-/bug-3571/bug.c @@ -0,0 +1,23 @@ +#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); +} |