From: "MartinBosslet (Martin Bosslet)" Date: 2012-05-08T19:48:18+09:00 Subject: [ruby-core:44938] [ruby-trunk - Feature #6409] public_send is easily bypassed Issue #6409 has been updated by MartinBosslet (Martin Bosslet). Wouldn't something as proposed in http://bugs.ruby-lang.org/issues/5455 help in the long run? ---------------------------------------- Feature #6409: public_send is easily bypassed https://bugs.ruby-lang.org/issues/6409#change-26526 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/