[ruby/prism] Fix the ripper translator to parse as the current ruby

Otherwise, it uses the latest prism version

https://github.com/ruby/prism/commit/86406f63aa
This commit is contained in:
Earlopain 2025-12-02 10:54:10 +01:00 committed by git
parent cc929bff7d
commit c06c2203ed

View File

@ -71,7 +71,7 @@ module Prism
# [[1, 13], :on_kw, "end", END ]]
#
def self.lex(src, filename = "-", lineno = 1, raise_errors: false)
result = Prism.lex_compat(src, filepath: filename, line: lineno)
result = Prism.lex_compat(src, filepath: filename, line: lineno, version: "current")
if result.failure? && raise_errors
raise SyntaxError, result.errors.first.message
@ -3295,7 +3295,7 @@ module Prism
# Lazily initialize the parse result.
def result
@result ||= Prism.parse(source, partial_script: true)
@result ||= Prism.parse(source, partial_script: true, version: "current")
end
##########################################################################