diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 16:29:51 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 16:29:51 +0000 |
| commit | 2ba797d3623bd7114ec708557a0ada1d80c7adaa (patch) | |
| tree | adf8e7857c2265b158a63de6aa4f9b16d38d092b /test/ruby | |
| parent | 66487605cf68c5f467c1ca54db4dbee294f6eb47 (diff) | |
merge revision(s) 57300,57368: [Backport #12613]
compile.c: check compile
* compile.c (iseq_compile_each): check if sub nodes succeeded.
[ruby-core:76531] [Bug #12613]
compile.c: check err_info
* compile.c (iseq_setup): bail out if any errors found.
[ruby-core:76531] [Bug #12613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_syntax.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index f40f15316b..61aab4bee5 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -958,6 +958,23 @@ eom end end + def test_syntax_error_in_rescue + bug12613 = '[ruby-core:76531] [Bug #12613]' + assert_syntax_error("#{<<-"begin;"}\n#{<<-"end;"}", /Invalid retry/, bug12613) + begin; + while true + begin + p + rescue + retry + else + retry + end + break + end + end; + end + private def not_label(x) @result = x; @not_label ||= nil end |
