https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2013-05-09T18:08:15Z
Ruby Issue Tracking System
Ruby master - Bug #8383: Ripper.lex does not handle correctly symbols whose identifiers coincide with keyword names
https://bugs.ruby-lang.org/issues/8383?journal_id=39218
2013-05-09T18:08:15Z
bozhidar (Bozhidar Batsov)
bozhidar@batsov.com
<ul></ul><p>On a related note I don't think this works correctly with method definitions as well:</p>
<p>[30] pry(main)> Ripper.lex('def alias(arg)')<br>
=> [[[1, 0], :on_kw, "def"],<br>
[[1, 3], :on_sp, " "],<br>
[[1, 4], :on_kw, "alias"],<br>
[[1, 9], :on_lparen, "("],<br>
[[1, 10], :on_ident, "arg"],<br>
[[1, 13], :on_rparen, ")"]]</p>
<p>[31] pry(main)> Ripper.lex('def aliass(arg)')<br>
=> [[[1, 0], :on_kw, "def"],<br>
[[1, 3], :on_sp, " "],<br>
[[1, 4], :on_ident, "aliass"],<br>
[[1, 10], :on_lparen, "("],<br>
[[1, 11], :on_ident, "arg"],<br>
[[1, 14], :on_rparen, ")"]]</p>
Ruby master - Bug #8383: Ripper.lex does not handle correctly symbols whose identifiers coincide with keyword names
https://bugs.ruby-lang.org/issues/8383?journal_id=39235
2013-05-10T11:31:46Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>Duplicates <a class="issue tracker-1 status-6 priority-4 priority-default closed" title="Bug: Ripper lexes :on_kw when it should find :on_ident (Rejected)" href="https://bugs.ruby-lang.org/issues/6306">#6306</a>.</p>