summaryrefslogtreecommitdiff
path: root/ext/-test-/bug-3571
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/bug-3571')
-rw-r--r--ext/-test-/bug-3571/bug.c23
-rw-r--r--ext/-test-/bug-3571/extconf.rb1
2 files changed, 24 insertions, 0 deletions
diff --git a/ext/-test-/bug-3571/bug.c b/ext/-test-/bug-3571/bug.c
new file mode 100644
index 0000000000..72d6bd1021
--- /dev/null
+++ b/ext/-test-/bug-3571/bug.c
@@ -0,0 +1,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);
+}
diff --git a/ext/-test-/bug-3571/extconf.rb b/ext/-test-/bug-3571/extconf.rb
new file mode 100644
index 0000000000..6390fce219
--- /dev/null
+++ b/ext/-test-/bug-3571/extconf.rb
@@ -0,0 +1 @@
+create_makefile("-test-/bug-3571/bug")