summaryrefslogtreecommitdiff
path: root/ext/-test-/bug-5832
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-12 03:04:42 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-12 03:04:42 +0000
commit9564e9bd235c2c0b2bccda1849bba9c40b508c3e (patch)
tree054f6ccdd592b55a9161c1897e095eabf2de5047 /ext/-test-/bug-5832
parent00468f21099d329de7a6665928f293f80632400f (diff)
* vm.c (invoke_block_from_c): fix unintentional block passing.
[ruby-dev:45071] [Bug #5832] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-/bug-5832')
-rw-r--r--ext/-test-/bug-5832/bug.c14
-rw-r--r--ext/-test-/bug-5832/extconf.rb1
2 files changed, 15 insertions, 0 deletions
diff --git a/ext/-test-/bug-5832/bug.c b/ext/-test-/bug-5832/bug.c
new file mode 100644
index 0000000..67be584
--- /dev/null
+++ b/ext/-test-/bug-5832/bug.c
@@ -0,0 +1,14 @@
+#include <ruby.h>
+
+static VALUE
+bug_funcall_callback(VALUE self, VALUE obj)
+{
+ return rb_funcall(obj, rb_intern("callback"), 0);
+}
+
+void
+Init_bug(void)
+{
+ VALUE mBug = rb_define_module("Bug");
+ rb_define_module_function(mBug, "funcall_callback", bug_funcall_callback, 1);
+}
diff --git a/ext/-test-/bug-5832/extconf.rb b/ext/-test-/bug-5832/extconf.rb
new file mode 100644
index 0000000..55a4b7d
--- /dev/null
+++ b/ext/-test-/bug-5832/extconf.rb
@@ -0,0 +1 @@
+create_makefile("-test-/bug-5832/bug")