Skip to content

Conversation

@pan93412
Copy link
Contributor

@pan93412 pan93412 commented Jan 30, 2026

CleanShot 2026-01-30 at 22 02 25@2x CleanShot 2026-01-30 at 22 02 30@2x CleanShot 2026-01-30 at 22 02 35@2x CleanShot 2026-01-30 at 22 03 13@2x CleanShot 2026-01-30 at 22 03 21@2x CleanShot 2026-01-30 at 22 03 25@2x

Fixed #867

@pan93412 pan93412 changed the title Improve mise.toml parser to confirm TOML specification Improve the mise.toml parser to conform to the TOML specification Co-authored-by: Riley Ho <riley@rileychh.dev> Jan 30, 2026
@pan93412 pan93412 changed the title Improve the mise.toml parser to conform to the TOML specification Co-authored-by: Riley Ho <riley@rileychh.dev> Improve the mise.toml parser to conform to the TOML specification Jan 30, 2026
@pan93412 pan93412 marked this pull request as ready for review January 30, 2026 13:57
Copilot AI review requested due to automatic review settings January 30, 2026 13:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the mise.toml parsing logic in parseRubyEngineAndVersion so that Ruby versions can be read correctly even when the line includes valid TOML end-of-line comments, addressing issue #867.

Changes:

  • Updated the mise.toml regex to allow leading whitespace, extract the quoted Ruby version, and ignore trailing # comments.
  • Left the overall control flow of parseRubyEngineAndVersion unchanged, still selecting .ruby-version, .tool-versions, or mise.toml based solely on file existence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Fixed ruby#867 ("mise.toml parser fails when ruby line contains
end-of-line comments")

Co-authored-by: Riley Ho <riley@rileychh.dev>
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good.

@eregon eregon merged commit 8d27f39 into ruby:master Jan 30, 2026
215 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mise.toml parser fails when ruby line contains end-of-line comments

3 participants