summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-23 00:40:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-23 00:40:08 +0000
commit140512d2225e6fd046ba1bdbcd1a27450f55c233 (patch)
treeea3c902891394c57d14dc04c3bdcf3ced924423b /parse.y
parent631272ff1587a7a76f75593ec5964493222ca50c (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 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index f838d3cb05..5f7bd2abe2 100644
--- a/parse.y
+++ b/parse.y
@@ -1000,7 +1000,7 @@ bodystmt : compstmt
$$ = NEW_RESCUE($1, $2, $3, &@$);
}
else if ($3) {
- rb_warn0("else without rescue is useless");
+ compile_error(p, "else without rescue is useless");
$$ = block_append(p, $$, $3);
}
if ($4) {