From: Eric Hodel Date: 2006-02-07T06:24:30+09:00 Subject: Re: inheritence of aliases methods - suprise! On Feb 6, 2006, at 1:06 PM, ara.t.howard@noaa.gov wrote: > this suprised me today: $ parse_tree_show - class A def assertion raise NotImplementedError end alias_method "assertion?", "assertion" end class B < A def assertion true end end [[:class, :B, :A, [:defn, :assertion, [:scope, [:block, [:args], [:true]]]]], [:class, :A, :Object, [:defn, :assertion, [:scope, [:block, [:args], [:fcall, :raise, [:array, [:const, :NotImplementedError]]]]]], [:defn, :"assertion?", [:fbody, [:scope, [:block, [:args], [:fcall, :raise, [:array, [:const, :NotImplementedError]]]]]]]]] > this only way i can seem to make this work is through some > self::inherited > hacks or to actually define assertion? in the base class. is there > no clean > way to inherit aliases? alias copies the method, it doesn't make a pointer to the method. -- Eric Hodel - drbrain@segment7.net - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com