diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-12 13:24:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-12 13:24:35 +0000 |
commit | e9c5e7625cfbeacf18c2dfd6ac9d9b3049beadac (patch) | |
tree | 963892461ed7703b815ad232e6993765121271c7 /proc.c | |
parent | 13dd738d888760d0a986c208376f2416e5c17f24 (diff) | |
download | ruby-e9c5e7625cfbeacf18c2dfd6ac9d9b3049beadac.tar.gz |
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
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |