From: viko@...
Date: 2019-07-06T01:53:53+00:00
Subject: [ruby-core:93573] [Ruby master Bug#15990] "else if" causes	confusing syntax error

Issue #15990 has been reported by viko (Viko Viko).

----------------------------------------
Bug #15990: "else if" causes confusing syntax error
https://bugs.ruby-lang.org/issues/15990

* Author: viko (Viko Viko)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
```
if false
  puts 'false'
else if true
  puts 'true'
end
```

This fails with "syntax error: unexpected end-of-input, expecting end". `else if` isn't `elsif`, of course, but if a file contains `else if` (especially on one line, though I don't know how easy that would be to track) and fails to parse, it is probably worth noting, especially since this kind of syntax error can't easily be traced back to a particular line.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>