smallbug19.rb

Simplest test case - sander (Sander Land), 11/09/2008 06:22 am

Download (258 Bytes)

 
1
def genmod
2
  Module.new{
3
    def foo
4
      super 
5
    end
6
  }
7
end
8

    
9
mod = genmod
10
mod2= genmod # comment this line to stop infinite recursion and get a (correct) 'no superclass method' error.
11
klass = Class.new{ include mod }
12
klass.new.foo # infinite recursion