summaryrefslogtreecommitdiff
path: root/ext/ripper
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-15 09:37:11 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-15 10:26:50 +0900
commit7898f4243f5df9ead0bf91cc8c40907c559d18c0 (patch)
tree542bb404e281eb447df3e06f87f6ca9ce8d63110 /ext/ripper
parentc59b9a8c0c50a6df13909c71e43de09a152b122d (diff)
ripper: return pushed new token instead of the token list
Diffstat (limited to 'ext/ripper')
-rw-r--r--ext/ripper/lib/ripper/lexer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index 9ada47927b0..e1a21d628b4 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)