diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-14 11:23:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-14 11:23:10 +0000 |
commit | 0f36e8fc03a5c6433972d6bb5f177d5f6e106bac (patch) | |
tree | 1eb8130db6c5693bd7a57935b7f49b74ba53aa82 /ext | |
parent | e53a46a58b76fc8c8f43fb0cc389948e77be44ff (diff) |
* eval.c (frame_func_id), vm_eval.c (rb_iterate),
vm_insnhelper.c (vm_yield_with_cfunc): as the name of a C-level
block, use the current method ID at the creation point.
[ruby-dev:41852]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/bug-3571/bug.c | 23 | ||||
-rw-r--r-- | ext/-test-/bug-3571/extconf.rb | 1 |
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") |