From e561fc44a4cc28984ad5b8f484214df5a7b02ca3 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 30 Jul 2016 02:26:30 +0000 Subject: merge revision(s) 55297: [Backport #12462] * vm_insnhelper.c (vm_throw_start): check if the iseq is symbol proc, class definition should not be a symbol proc. [ruby-core:75856] [Bug #12462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_symbol.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 2133573fc3..540661afc0 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -157,6 +157,15 @@ class TestSymbol < Test::Unit::TestCase assert_equal(1, first, bug11594) end + private def return_from_proc + Proc.new { return 1 }.tap(&:call) + end + + def test_return_from_symbol_proc + bug12462 = '[ruby-core:75856] [Bug #12462]' + assert_equal(1, return_from_proc, bug12462) + end + def test_to_proc_for_hash_each bug11830 = '[ruby-core:72205] [Bug #11830]' assert_normal_exit(<<-'end;', bug11830) # do -- cgit v1.2.3