Issue #8163 has been reported by authorNari (Narihiro Nakamura).

----------------------------------------
Backport #8163: Backport r39919
https://bugs.ruby-lang.org/issues/8163

Author: authorNari (Narihiro Nakamura)
Status: Assigned
Priority: Normal
Assignee: nagachika (Tomoyuki Chikanaga)
Category: 
Target version: 


Please backport r39919 to avoid SEGV in re-defined methods.
see also: https://bugs.ruby-lang.org/issues/8100


-- 
http://bugs.ruby-lang.org/