mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
e53a46a58b
commit
0f36e8fc03
7 changed files with 57 additions and 1 deletions
23
ext/-test-/bug-3571/bug.c
Normal file
23
ext/-test-/bug-3571/bug.c
Normal file
|
@ -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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue