summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-30 21:42:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-30 21:42:52 +0000
commitf964fd3fa5070b95cb412cb529b47e168c0af25a (patch)
tree0f2b153ac4fb185912f23f4ce60c5c2f99f28d0d /test/ruby/test_symbol.rb
parent7e4e641c009fede540a9e307ac1d3bb9dcf00f7a (diff)
vm_args.c: search symbol proc in super classes
* vm_args.c (refine_sym_proc_call): traverse ancestors to search inherited methods for symbol proc. [ruby-dev:50741] [Bug #15489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 6438ec8771..13d7cc9d57 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -191,6 +191,12 @@ class TestSymbol < Test::Unit::TestCase
assert_equal(:hogehoge, _test_to_proc_arg_with_refinements_call(&:hoge))
end
+ def test_to_proc_arg_with_refinements_undefined
+ assert_raise(NoMethodError) do
+ _test_to_proc_arg_with_refinements_call(&:foo)
+ end
+ end
+
private def return_from_proc
Proc.new { return 1 }.tap(&:call)
end