< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #15990 has been updated by nobu (Nobuyoshi Nakada).
Warning only after a syntax error?
```
$ ./ruby -w
if false
else if true
end
-:3: syntax error, unexpected end-of-input, expecting `end'
-:3: `end' of `if' matched `else' before `if'
-:2: maybe `elsif'?
```
----------------------------------------
Bug #15990: "else if" causes confusing syntax error
https://bugs.ruby-lang.org/issues/15990#change-79165
* 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>