# Removing undefined method on 1.8

**URL:** <https://www.ruby-forum.com/t/removing-undefined-method-on-1-8/115257>\
**Category:** Development\
**Created:** [September 22, 2007, 5:34pm UTC](https://www.ruby-forum.com/t/removing-undefined-method-on-1-8/115257 "2007-09-22T17:34: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:34pm UTC](https://www.ruby-forum.com/t/removing-undefined-method-on-1-8/115257/1 "2007-09-22T17:34:29Z")

</div>

1.8 e$B$Ge(B undef e$B$7$?$b$N$re(B remove\_method e$B$9$k$He(B NameError  
e$B$K$Je(B  
e$B$j!"$=$7$Fe(B undef e$BA0$N$h$&$K8F$Y$k$h$&$K$J$j$^$9!#e(B

% ./ruby -ve ’  
class C  
undef display  
begin  
remove\_method :display  
rescue NameError  
p $!  
end  
end  
C.new.display  
’  
ruby 1.8.6 (2007-09-20 patchlevel 5000) [i686-linux]  
#\<NameError: method `display’ not defined in C\>  
#\<C:0xb7d49a60\>
