From: Guillaume Marcais Date: 2003-07-16T07:28:45+09:00 Subject: Re: Custom method_missing doesn't trap super call It doesn't work for me, with ruby 1.6.8 on Linux/i386 (Mandrake) and Linux/PPC (gentoo). Are we missing something? Guillaume. gus@mac gus $ ruby class Base def method_missing(method, *args) puts "In method_missing: " + method.id2name end end class MyClass < Base def foobar() puts "In MyClass.foobar" super end end t = MyClass.new t.baz() t.foobar() In method_missing: baz In MyClass.foobar -:11:in `foobar': super: no superclass method `foobar' (NameError) from -:17 On Tue, 2003-07-15 at 11:43, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Custom method_missing doesn't trap super call" > on 03/07/15, Richard Dale writes: > > |> This does not mean I'm refusing "method_missing for super". I'm still > |> thinking. > |OK no problem - but from the method names, maybe the perl autoload feature > |was intended to load native methods on demand, but perhaps method_missing > |was aimed at custom error trapping? > > I guess so. > > But I just found out the _very_ important fact, that the original > script you've shown worked without any error for both 1.6.8 and 1.8.0 > preview. What version were you using? > > matz. >