From: Paul Brannan Date: 2001-11-01T01:20:22+09:00 Subject: [ruby-talk:23979] Strangeness with undefining methods When I try to undef a method and then redefine it, I get this: [pbrannan@zaphod tmp]$ irb irb(main):001:0> $VERBOSE = true true irb(main):002:0> def foo; end nil irb(main):003:0> foo nil irb(main):004:0> undef :foo nil irb(main):005:0> foo NameError: undefined local variable or method `foo' for # from (irb):5 irb(main):006:0> def foo; end (irb):6: warning: discarding old foo (irb):6: warning: overriding global function `foo' nil If 'foo' is already removed, then why do I get the "discarding old foo" message? Paul