summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2025-12-21 05:58:23 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-12-26 11:00:51 +0900
commitf3149af35a30c4eb334006faef729a6e514d4cf2 (patch)
treec3eec853d7c18c42c540ae5a618735dfac6a48b0 /lib
parent44a17656842a567eb82c43024daaf9fcaff61e5d (diff)
[ruby/prism] Sync `Prism::Translation::ParserCurrent` with Ruby 4.0
This PR updates the fallback version for `Prism::Translation::ParserCurrent` from 3.4 to 4.0. Currently, the fallback resolves to `Parser34`, as shown below: ```console $ ruby -v -rprism -rprism/translation/parser_current -e 'p Prism::Translation::ParserCurrent' ruby 3.0.7p220 (2024-04-23 revision https://github.com/ruby/prism/commit/724a071175) [x86_64-darwin23] warning: `Prism::Translation::Current` is loading Prism::Translation::Parser34, but you are running 3.0. Prism::Translation::Parser34 ``` Following the comment "Keep this in sync with released Ruby.", it seems like the right time to set this to Ruby 4.0, which is scheduled for release this week. https://github.com/ruby/prism/commit/115f0a118c
Diffstat (limited to 'lib')
-rw-r--r--lib/prism/translation/parser_current.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prism/translation/parser_current.rb b/lib/prism/translation/parser_current.rb
index ac6daf7082..f13eff6bbe 100644
--- a/lib/prism/translation/parser_current.rb
+++ b/lib/prism/translation/parser_current.rb
@@ -16,7 +16,7 @@ module Prism
ParserCurrent = Parser41
else
# Keep this in sync with released Ruby.
- parser = Parser34
+ parser = Parser40
major, minor, _patch = Gem::Version.new(RUBY_VERSION).segments
warn "warning: `Prism::Translation::Current` is loading #{parser.name}, " \
"but you are running #{major}.#{minor}."