rails/rails — pull request #14180 by PragTob (2014-02-24 16:13:48+00:00)
Title: Honor public/private in ActionView::Helpers::Tags::Base#value

* use public_send instead of send to avoid calling private methods in form helpers

I do not know if this feature is wanted, but it was simple enough to implement so I just went ahead and did it.

I discovered this together with a bug in MRI/simple_delegator.
E.g. When you have an object using `SimpleDelegator` that has an `open` method which you try to call with `send` it ends up calling an `open` method somewhere in Ruby that wants 1..3 arguments in Ruby 2.0. Too bad if you have an attribute named open.
( see [this gist](https://gist.github.com/PragTob/9189371) for a sample)

That does not happen with public_send. However that is a bug somewhere else. So writing a test for it seemed too hard so I wrote a simple honor public/private test. Any suggestions for a better testing of this?

I do think that in general it'd be good to honor public/private in this case. What do you think?

Cheers,
Tobi