diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-15 14:12:22 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-15 14:12:22 +0000 |
commit | 43979d409f663f142a9eb1319ed1285d2da29a8d (patch) | |
tree | 0e74f8f1014fcd0eb942cf661eda2d8d6a418558 /proc.c | |
parent | 7ec073a8175001073d1d3ad4b78442e3b02e767e (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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |