summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEarlopain <14981592+Earlopain@users.noreply.github.com>2025-07-22 13:16:40 +0200
committergit <svn-admin@ruby-lang.org>2025-07-29 17:17:28 +0000
commit026079925c2ce7ff660d5e1ba8e2e0d7b0cc6b02 (patch)
tree1779e52a8c645769fcf75d798c82abeed441b013 /doc
parentb22eb0e468a88d2da77cecf2355623fe7eff1ba6 (diff)
[ruby/prism] Do not use `0` to indicate the latest ruby version to parse
This makes it hard to do version checks against this value. The current version checks work because there are so few possible values at the moment. As an example, PR 3337 introduces new syntax for ruby 3.5 and uses `PM_OPTIONS_VERSION_LATEST` as its version guard. Because what is considered the latest changes every year, it must later be changed to `parser->version == parser->version == PM_OPTIONS_VERSION_CRUBY_3_5 || parser->version == PM_OPTIONS_VERSION_LATEST`, with one extra version each year. With this change, the PR can instead write `parser->version >= PM_OPTIONS_VERSION_CRUBY_3_5` which is self-explanatory and works for future versions. https://github.com/ruby/prism/commit/8318a113ca
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions