From: ahoward Date: 2003-02-08T03:17:40+09:00 Subject: Re: catching super() with method_missing On Sat, 8 Feb 2003, Brad Hilton wrote: > Hello, > > I was recently surprised to find that I can't do: > > class Outer > def method_missing(methID, *args, &block) > p methID.id2name > end > end > > class Inner < Outer > def foo > super > end > end > > obj = Inner.new > obj.foo > > It raises: "super: no superclass method `foo' (NameError)" stranger still that this _does_ work : class Outer def method_missing(methID, *args, &block) p methID.id2name end end class Inner < Outer def foo super end end o = Outer.new o.foo obj = Inner.new obj.foo -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================