From: "alexeymuranov (Alexey Muranov)" Date: 2012-05-08T19:02:29+09:00 Subject: [ruby-core:44937] [ruby-trunk - Feature #6409] public_send is easily bypassed Issue #6409 has been updated by alexeymuranov (Alexey Muranov). @postmodernl, `send` is a public method, why would `public_send` refuse to call it? Were you suggesting to remove the `send` method? ---------------------------------------- Feature #6409: public_send is easily bypassed https://bugs.ruby-lang.org/issues/6409#change-26525 Author: postmodern (Hal Brodigan) Status: Rejected Priority: Normal Assignee: Category: core Target version: 2.0.0 =begin (({public_send})) can easily be bypassed, by using it to call (({send})). (({public_send})) should explicitly not allow calling (({send})). class Test private def secret "top secret" end end t = Test.new t.public_send(:secret) # => NoMethodError: private method `secret' called for # t.public_send(:send, :secret) # => "top secret" t.public_send(:send, :exec, "rm -rf ~") =end -- http://bugs.ruby-lang.org/