Bug #575: module_function: undefined method
http://redmine.ruby-lang.org/issues/show/575

Author: Tilman Giese
Status: Open, Priority: Low
Category: core

Output
------

test.rb:17: [BUG] undefined method `m'; can't happen
ruby 1.9.0 (2008-09-09 revision 19264) [i386-mingw32]

-- control frame ----------
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC  :module_function
c:0004 p:0013 s:0008 b:0008 l:000007 d:000007 CLASS  test.rb:17
c:0003 p:0039 s:0006 b:0006 l:000005 d:000005 TOP    test.rb:16
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private_class_method
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP    <dummy toplevel>:302
---------------------------
DBG> : "test.rb:17:in `module_function'"
DBG> : "test.rb:17:in `<module:M2>'"
DBG> : "test.rb:16:in `<main>'"


Source
------

module M1
  def m; end
  private :m
end
module M2
  include M1
  public :m
end
module M1
  undef_method :m
end
module M2
  module_function :m
end


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