mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
parse.y: k_else in bodystmt
* parse.y (bodystmt): expand opt_else to show the error message at the right place. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
140512d222
commit
f3fbf1dfad
2 changed files with 34 additions and 15 deletions
|
@ -14,7 +14,7 @@ class TestParse < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_else_without_rescue
|
||||
assert_syntax_error(<<-END, /else without rescue/)
|
||||
assert_syntax_error(<<-END, %r":#{__LINE__+2}: else without rescue"o, [__FILE__, __LINE__+1])
|
||||
begin
|
||||
else
|
||||
42
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue