mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
proc.c: check iseq before replication
* 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
This commit is contained in:
parent
509089e9b1
commit
0899bd5227
1 changed files with 1 additions and 1 deletions
2
proc.c
2
proc.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue