-
Notifications
You must be signed in to change notification settings - Fork 175
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
In IRB, it's better to parse ruby code with current ruby version for usability, but doesn't strictly require current version.
It basically work except for few edge cases: Error tokens (valid in latest) won't be rendered RED. (example: "if a\n&&b\nend")
Parsing with Prism.parse(code, version: RUBY_VERSION >= '3.3' ? '3.3' : 'current') is not enough.
Lower bound(3.3) may change in the future, RUBY_VERSION may exceed upper bound(3.4 (prism-1.6) or 4.1 (prism >= 1.7)) that may block updating ruby version in a rails app.
It would be helpful if there is an easy way to use current version robustly (like Prism.parse(code, version: 'nearest' or 'closest')), or a way to get supported version range.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request