From: Jacob Fugal Date: 2005-08-31T00:59:06+09:00 Subject: Re: Method behaves differently when called using #send > OK, here's another idea. How about > > foo.send(:bar) > > calls only public methods and > > send(:bar) > > calls private methods of the receiver as well? > |At first glance that seems amazingly logical. But on second thought it > |may be too logical. What of the use case where one purposefuly wishes > |to call private method from the outside (you know "bad-form" > |meta-programming stuff). > > foo.instance_eval{ > send(:bar) > } I like it. One of my favorite suggestions from the above thread was "instance_send". I would suggest the following convenience method to go along with the above: class Object def instance_send( symbol, *args, &block ) instance_eval { send( symbol, *args, &block ) } end end Thus the real difference is based on context (and there is already precedence for explicit vs. implicit receiver being treated differently) as Matz suggested, but there's an instance_send method to exactly parallel instance_eval. Very clean, IMO. Jacob Fugal