diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-28 08:28:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-28 08:28:42 +0000 |
commit | 67850e8a9e80e82febe32ad127bf941f67eb28e3 (patch) | |
tree | 6eb746b2e3fa0c5bfdf433258093c6883ef1e1fa /proc.c | |
parent | 9006d059f4eebe15f25839b9306d90155fda7b0a (diff) |
proc.c: empty iseq names
* proc.c (proc_binding): unified the name and realpath of an empty
iseq.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2844,12 +2844,15 @@ proc_binding(VALUE self) const struct vm_ifunc *ifunc = block->as.captured.code.ifunc; if (IS_METHOD_PROC_IFUNC(ifunc)) { VALUE method = (VALUE)ifunc->data; + VALUE name = rb_fstring_cstr("<empty_iseq>"); + rb_iseq_t *empty; binding_self = method_receiver(method); iseq = rb_method_iseq(method); env = VM_ENV_ENVVAL_PTR(block->as.captured.ep); env = env_clone(env, method_cref(method)); /* set empty iseq */ - RB_OBJ_WRITE(env, &env->iseq, rb_iseq_new(NULL, rb_str_new2("<empty iseq>"), rb_str_new2("<empty_iseq>"), Qnil, 0, ISEQ_TYPE_TOP)); + empty = rb_iseq_new(NULL, name, name, Qnil, 0, ISEQ_TYPE_TOP); + RB_OBJ_WRITE(env, &env->iseq, empty); break; } else { |