aboutsummaryrefslogtreecommitdiffstats
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-12 13:24:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-12 13:24:35 +0000
commite9c5e7625cfbeacf18c2dfd6ac9d9b3049beadac (patch)
tree963892461ed7703b815ad232e6993765121271c7 /proc.c
parent13dd738d888760d0a986c208376f2416e5c17f24 (diff)
downloadruby-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index a3882a9acd..6aaf517880 100644
--- a/proc.c
+++ b/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;