On Tue, Nov 13, 2007 at 09:37:53PM +0900, David A. Black wrote:
> I think it's extremely unlikely that send's ability to see private
> methods was an error. It does, however, mean that having send and
> send!, where send is the one that honors visibility, could cause
> compabitility issues. I don't think that matters; I honestly don't
> think very many people are going to be running 1.8 code under 1.9
> without going over it very carefully and making necessary changes.

I think that most people expect send to be able to call
private methods use it like this:

  class Foo; end
  Foo.send(:const_set, :BAR, 42)

when this would work just as well:

  Foo.instance_eval { const_set :BAR, 42 }

and is IMO a bit clearer.

And if send were to honor visibility and if for some reason one did need
a send that doesn't honor visibility, I see no reason why this wouldn't
be sufficient:

  obj.instance_eval { send msg, *args }

Paul