mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
proc.c: method body GC guard
* proc.c (rb_mod_define_method): guard method body to prevent its method entry from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
13dd738d88
commit
e9c5e7625c
1 changed files with 1 additions and 0 deletions
1
proc.c
1
proc.c
|
@ -1719,6 +1719,7 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
|
|||
if (noex == NOEX_MODFUNC) {
|
||||
rb_method_entry_set(rb_singleton_class(mod), id, method->me, NOEX_PUBLIC);
|
||||
}
|
||||
RB_GC_GUARD(body);
|
||||
}
|
||||
else if (rb_obj_is_proc(body)) {
|
||||
rb_proc_t *proc;
|
||||
|
|
Loading…
Reference in a new issue