From: Eric Hodel Date: 2007-01-21T16:24:52+09:00 Subject: Re: Getting the version number for rubygems? On Jan 20, 2007, at 21:29, Gregory Brown wrote: > On 1/21/07, Devin Mullins wrote: >> Gregory Brown wrote: >> > instead of alias i'll use alias_method. >> Why? (Curious, not argumentative.) > > alias is really a somewhat scary function. I can't think of a good > example right now, but i've seen a couple different surprising things > with alias, wheras alias_method is simple and has normal behaviour. > Perhaps someone on the list can help me out with this. You're seeing phantoms. There's no difference between alias_method and alias on the inside. case NODE_ALIAS: if (NIL_P(ruby_class)) { rb_raise(rb_eTypeError, "no class to make alias"); } rb_alias(ruby_class, rb_to_id(rb_eval(self, node->u1.node)), rb_to_id(rb_eval(self, node->u2.node))); static VALUE rb_mod_alias_method(mod, newname, oldname) VALUE mod, newname, oldname; { rb_alias(mod, rb_to_id(newname), rb_to_id(oldname)); -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE!