ruby-changes:64172
From: Nobuyoshi <ko1@a...>
Date: Tue, 15 Dec 2020 10:27:38 +0900 (JST)
Subject: [ruby-changes:64172] 7898f4243f (master): ripper: return pushed new token instead of the token list
https://git.ruby-lang.org/ruby.git/commit/?id=7898f4243f From 7898f4243f5df9ead0bf91cc8c40907c559d18c0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 15 Dec 2020 09:37:11 +0900 Subject: ripper: return pushed new token instead of the token list diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 9ada479..e1a21d6 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -185,7 +185,9 @@ class Ripper https://github.com/ruby/ruby/blob/trunk/ext/ripper/lib/ripper/lexer.rb#L185 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/