aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-19 08:02:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-19 08:02:17 +0000
commit300431ecb5c1356f8a8e25a66f6d7300971f1862 (patch)
tree78d96ea57643ff40a546811c9829f7ea395caa0c /test
parent79d800ad9c5c95f189fffd227ab6037524371ce4 (diff)
downloadruby-300431ecb5c1356f8a8e25a66f6d7300971f1862.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_refinement.rb4
1 files changed, 2 insertions, 2 deletions
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))