summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-15 16:06:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-15 16:06:52 +0000
commit2fda4a5568e703192cb5eb719b99c067ab5c6db7 (patch)
tree5c516476d552192efbefc54755ba1de444feef05 /proc.c
parent59d0dfcae0fee7397782c20038c53761ce9f836c (diff)
proc.c: merge blocks
* proc.c (proc_binding): merge blocks in same condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/proc.c b/proc.c
index 03b2520f5a..8ede200b6f 100644
--- a/proc.c
+++ b/proc.c
@@ -2614,6 +2614,7 @@ proc_binding(VALUE self)
if (IS_METHOD_PROC_IFUNC(ifunc)) {
VALUE method = (VALUE)ifunc->data;
envval = env_clone(envval, method_receiver(method), method_cref(method));
+ iseq = rb_method_iseq(method);
}
else {
rb_raise(rb_eArgError, "Can't create Binding from C level Proc");
@@ -2624,17 +2625,6 @@ proc_binding(VALUE self)
GetBindingPtr(bindval, bind);
bind->env = envval;
- if (RUBY_VM_IFUNC_P(iseq)) {
- struct vm_ifunc *ifunc = (struct vm_ifunc *)iseq;
- if (IS_METHOD_PROC_IFUNC(ifunc)) {
- VALUE method = (VALUE)ifunc->data;
- iseq = rb_method_iseq(method);
- }
- else {
- iseq = NULL;
- }
- }
-
if (iseq) {
bind->path = iseq->body->location.path;
bind->first_lineno = FIX2INT(rb_iseq_first_lineno(iseq));