Project

General

Profile

Actions

Feature #15990

closed

"else if" causes confusing syntax error

Added by viko (Viko Viko) almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:93573]

Description

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0