diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-15 09:37:11 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-15 10:26:50 +0900 |
commit | 7898f4243f5df9ead0bf91cc8c40907c559d18c0 (patch) | |
tree | 542bb404e281eb447df3e06f87f6ca9ce8d63110 | |
parent | c59b9a8c0c50a6df13909c71e43de09a152b122d (diff) |
ripper: return pushed new token instead of the token list
-rw-r--r-- | ext/ripper/lib/ripper/lexer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 9ada47927b..e1a21d628b 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -185,7 +185,9 @@ class Ripper end def _push_token(tok) - @buf.push Elem.new([lineno(), column()], __callee__, tok, state()) + e = Elem.new([lineno(), column()], __callee__, tok, state()) + @buf.push(e) + e end def on_error(mesg) |