summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 07:16:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 07:16:00 +0000
commit468854406c57b319c0067c8582900d76fd514e28 (patch)
treee1b856dd20dc60e60c8a67758d84bdcfd694ef8c /proc.c
parentf173b876f6a55a4b9cbbf7c3535cc7c3341b7af4 (diff)
merge revision(s) 47891: [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_0_0@47935 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 5442233747..600549c52f 100644
--- a/proc.c
+++ b/proc.c
@@ -1392,6 +1392,7 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
}
}
rb_method_entry_set(mod, id, method->me, noex);
+ RB_GC_GUARD(body);
}
else if (rb_obj_is_proc(body)) {
rb_proc_t *proc;