diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-23 00:40:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-23 00:40:08 +0000 |
commit | 140512d2225e6fd046ba1bdbcd1a27450f55c233 (patch) | |
tree | ea3c902891394c57d14dc04c3bdcf3ced924423b /test | |
parent | 631272ff1587a7a76f75593ec5964493222ca50c (diff) |
parse.y: else without rescue
* parse.y (bodystmt): [EXPERIMENTAL] make `else` without `rescue`
a syntax error. [DevelopersMeeting20180315Japan]
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20180315Japan
https://docs.google.com/document/d/1RT0ijSo8uJ4Awn3CEvuYkjH0TVeXSYgeAFNmVGYC3ak/edit#
> * do-else-end
> https://twitter.com/joker1007/status/974173396006129664
> https://twitter.com/joker1007/status/974173641347756032
> https://twitter.com/joker1007/status/974176512554369027
> Will be SyntaxError in 2.6-preview2
> All of begin/do/def (experimental)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_parse.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index cd1c5a3ecc..e2dd179f9a 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -14,13 +14,12 @@ class TestParse < Test::Unit::TestCase end def test_else_without_rescue - x = eval <<-END, nil, __FILE__, __LINE__+1 + assert_syntax_error(<<-END, /else without rescue/) begin else 42 end END - assert_equal(42, x) end def test_alias_backref |