summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 14:12:22 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 14:12:22 +0000
commit43979d409f663f142a9eb1319ed1285d2da29a8d (patch)
tree0e74f8f1014fcd0eb942cf661eda2d8d6a418558 /proc.c
parent7ec073a8175001073d1d3ad4b78442e3b02e767e (diff)
merge revision(s) r47891: [Backport #10373]
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/branches/ruby_2_1@47947 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 cc4e71080c..e5b6e5313d 100644
--- a/proc.c
+++ b/proc.c
@@ -1666,6 +1666,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;