From: Trans Date: 2007-02-01T04:50:11+09:00 Subject: Re: alias callback On Jan 31, 6:48 am, "George Ogata" wrote: > On 1/30/07, Trans wrote: > > > How does one reflect on alias definitions. Using #method_added only > > gives you the name of the alias being defined --as if it were a new > > method. And it's not possible to override 'alias' b/c it's not a real > > method. > > > Ideas? > > UnboundMethod#== returns true for aliases, so hopefully: Good thinking! > class Module > def alias?(name) > name = name.to_s > instance_method = instance_method(name) > (instance_methods + private_instance_methods).any? do |n| > n != name && instance_method(n) == instance_method > end > end > end [snip] Nice. I'll give this a whril and put it in Facets, crediting you. Super Thanks!!! T.