Skip to content

Commit

Permalink
proc.c: check iseq before replication
Browse files Browse the repository at this point in the history
* proc.c (proc_binding): do not replicate when iseq not found as
  rb_method_get_iseq() can return NULL.
  [ruby-core:68673] [Bug #11012]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Mar 29, 2015
1 parent 509089e commit 0899bd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proc.c
Expand Up @@ -2507,7 +2507,7 @@ proc_binding(VALUE self)
}
iseq = rb_method_get_iseq((VALUE)((struct vm_ifunc *)iseq)->data);
GetEnvPtr(envval, env);
if (env->local_size < iseq->local_size) {
if (iseq && env->local_size < iseq->local_size) {
int prev_local_size = env->local_size;
int local_size = iseq->local_size;
VALUE newenvval = TypedData_Wrap_Struct(RBASIC_CLASS(envval), RTYPEDDATA_TYPE(envval), 0);
Expand Down

0 comments on commit 0899bd5

Please sign in to comment.