diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-26 07:59:54 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-26 07:59:54 +0000 |
commit | eb1d5ab5a0309e117ea2cb05915131393adc893d (patch) | |
tree | cdce213710d853dd34449fe288cba2628e941106 /test | |
parent | 66be165f30cb6a7d52634ce817013e510094bb1e (diff) |
merge revision(s) 66658: [Backport #15489]
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/branches/ruby_2_6@66925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_symbol.rb | 6 |
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 |