From c8fee08a3d677b6980efacb3ea1347910e1af6ff Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 19 Oct 2016 08:02:17 +0000 Subject: vm_insnhelper.c: refinements with send * vm_insnhelper.c (vm_call_opt_send): enable refinements with Kernel#send and BasicObject#__send__. [Feature #11476] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_refinement.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index 2ecbf8edf0..5e881edb91 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -171,10 +171,10 @@ class TestRefinement < Test::Unit::TestCase end end - def test_send_should_not_use_refinements + def test_send_should_use_refinements foo = Foo.new assert_raise(NoMethodError) { foo.send(:z) } - assert_raise(NoMethodError) { FooExtClient.send_z_on(foo) } + assert_equal("FooExt#z", FooExtClient.send_z_on(foo)) assert_raise(NoMethodError) { foo.send(:z) } assert_equal(true, RespondTo::Sub.new.respond_to?(:foo)) -- cgit v1.2.3