From 84cfe8f8d669c3b8bdadc8a819d6482b890c5e24 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 5 Dec 2012 16:10:41 +0000 Subject: vm_eval.c: public_send does not consider how it is called * vm_eval.c (rb_method_call_status): use Qundef as no self instead of the current self. * vm_eval.c (send_internal): public_send does not consider how it is called, as mentioned in r14173. patched by charliesome (Charlie Somerville). [ruby-core:50489] [Bug #7499] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_object.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby/test_object.rb') diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 6b679b5201..9f0e9bc5b2 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -587,6 +587,8 @@ class TestObject < Test::Unit::TestCase assert_raise(NoMethodError) {c.public_send(:priv)} assert_raise(NoMethodError) {c.public_send(:prot)} assert_raise(NoMethodError) {c.invoke(:priv)} + bug7499 = '[ruby-core:50489]' + assert_raise(NoMethodError, bug7499) {c.invoke(:prot)} end def test_no_superclass_method -- cgit v1.2.3