summaryrefslogtreecommitdiff
path: root/test/ruby/test_refinement.rb
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
commitc8fee08a3d677b6980efacb3ea1347910e1af6ff (patch)
tree78d96ea57643ff40a546811c9829f7ea395caa0c /test/ruby/test_refinement.rb
parent79d49d1a7004a1e461e9b4f239eed1d201ed9d51 (diff)
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/ruby/test_refinement.rb')
-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))