Skip to content

Commit b385f47

Browse files
committed
Don't use RUBY_VERSION.to_f
There will be a bunch of other problems should 3.10 ever exists, but I guess why not fix this one now.
1 parent f44e2df commit b385f47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/prism/translation/parser_current.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ module Translation
1313
else
1414
# Keep this in sync with released Ruby.
1515
parser = Parser34
16+
major, minor, _patch = Gem::Version.new(RUBY_VERSION).segments
1617
warn "warning: `Prism::Translation::Current` is loading #{parser.name}, " \
17-
"but you are running #{RUBY_VERSION.to_f}."
18+
"but you are running #{major}.#{minor}."
1819
ParserCurrent = parser
1920
end
2021
end

0 commit comments

Comments
 (0)