ruby-changes:35809
From: nobu <ko1@a...>
Date: Sun, 12 Oct 2014 22:24:47 +0900 (JST)
Subject: [ruby-changes:35809] nobu:r47891 (trunk): proc.c: method body GC guard
nobu 2014-10-12 22:24:35 +0900 (Sun, 12 Oct 2014) New Revision: 47891 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47891 Log: proc.c: method body GC guard * proc.c (rb_mod_define_method): guard method body to prevent its method entry from GC. Modified files: trunk/proc.c Index: proc.c =================================================================== --- proc.c (revision 47890) +++ proc.c (revision 47891) @@ -1719,6 +1719,7 @@ rb_mod_define_method(int argc, VALUE *ar https://github.com/ruby/ruby/blob/trunk/proc.c#L1719 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/