summaryrefslogtreecommitdiff
path: root/ext/ripper/lib/ripper/lexer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ripper/lib/ripper/lexer.rb')
-rw-r--r--ext/ripper/lib/ripper/lexer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index e1a21d628b4..6a9a9cb39a2 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -190,8 +190,8 @@ class Ripper
e
end
- def on_error(mesg)
- @errors.push Elem.new([lineno(), column()], __callee__, token(), state(), mesg)
+ def on_error(mesg, tok = token())
+ @errors.push Elem.new([lineno(), column()], __callee__, tok, state(), mesg)
end
PARSER_EVENTS.grep(/_error\z/) do |e|
alias_method "on_#{e}", :on_error