# SEGV by removing undefined method

**URL:** <https://www.ruby-forum.com/t/segv-by-removing-undefined-method/115256>\
**Category:** Development\
**Created:** [September 22, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/segv-by-removing-undefined-method/115256 "2007-09-22T17:29:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [September 22, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/segv-by-removing-undefined-method/115256/1 "2007-09-22T17:29:29Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B

## % ./ruby -e ’ class C undef display remove\_method :display end ’ -e:4: – control frame ---------- c:0005 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :remove\_method c:0004 p:0011 s:0007 b:0007 l:000006 d:000006 CLASS -e:4 c:0003 p:0006 s:0005 b:0005 l:000004 d:000004 TOP -e:2 c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

DBG\> : “-e:4:in `<class:C>'" DBG> : "-e:2:in`'”  
– backtrace of native function call (Use addr2line) –  
0x80f7eb2  
0x811466c  
0x811470b  
0x80c1791  
0xb7f61420  
0x8058ca8  
0x80edf5a  
0x80f59e1  
0x80f5570  
0x80f1daf  
0x80f5bba  
0x80f61ff  
0x805a47d  
0x805a500  
0x80576c5  
0xb7dcaea8  
0x80575f1
