Skip to content

fix(ruby): accept both "_" and "." tag separators from ruby/ruby#1649

Open
rhiroe wants to merge 1 commit into
devcontainers:mainfrom
rhiroe:fix/ruby-tag-separator-4x
Open

fix(ruby): accept both "_" and "." tag separators from ruby/ruby#1649
rhiroe wants to merge 1 commit into
devcontainers:mainfrom
rhiroe:fix/ruby-tag-separator-4x

Conversation

@rhiroe
Copy link
Copy Markdown

@rhiroe rhiroe commented May 14, 2026

ruby/ruby switched its release tag separator from "_" (e.g. v3_4_9) to "." (e.g. v4.0.4) starting at Ruby 4.0.0. The current regex in find_version_from_git_tags only matches the "_" form, so VERSION=latest and ADDITIONAL_VERSIONS resolution silently skip every 4.x release.

Normalize the tag list with tr "_" "." before matching and use "." canonically in the regex. The separator parameter is no longer consulted for matching, so drop the now-redundant "_" argument from the three ruby call sites.

@rhiroe rhiroe marked this pull request as ready for review May 14, 2026 08:17
@rhiroe rhiroe requested a review from a team as a code owner May 14, 2026 08:17
@rhiroe rhiroe marked this pull request as draft May 14, 2026 08:19
@rhiroe rhiroe force-pushed the fix/ruby-tag-separator-4x branch from 4f59d16 to 686a627 Compare May 14, 2026 08:40
@rhiroe
Copy link
Copy Markdown
Author

rhiroe commented May 14, 2026

@microsoft-github-policy-service agree

@rhiroe rhiroe marked this pull request as ready for review May 14, 2026 08:43
Copy link
Copy Markdown
Contributor

@Kaniska244 Kaniska244 left a comment

Choose a reason for hiding this comment

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

Hi @rhiroe

Thank you for the contribution. Would you kindly bump the feature version and also add relevant test cases if applicable for this change. Also please check the failing tests.

@rhiroe
Copy link
Copy Markdown
Author

rhiroe commented May 15, 2026

The CI failure is caused by RVM's stable branch not including Ruby 4.x in its known rubies list (it currently tops out at ruby-3.0.0). Ruby 4.x is already present in RVM's master branch but has not yet been merged into stable.

Because install.sh uses curl -sSL https://get.rvm.io | bash -s stable, the installed RVM does not recognize 4.0.4 as a known MRI ruby. As a result, the default alias is created as 4.0.4 instead of ruby-4.0.4, producing a dangling symlink at /usr/local/rvm/rubies/default. This causes which gem to return nothing, and ${ROOT_GEM} install rake expands to install rake — invoking the system install command instead of gem install.

I'm not sure what the best path forward is here. A few options come to mind:

  • Add rvm use default — resolves the issue immediately, though this doesn't address the underlying cause.
  • Wait for RVM's stable branch to include Ruby 4.x — would address the root cause, though the timeline depends on the RVM project.
  • Switch from stable to master in the RVM install command — would bring in Ruby 4.x support now, though it's worth considering whether using master is appropriate for this environment.

Happy to hear any thoughts on which direction makes sense.

ruby/ruby switched its release tag separator from "_" (e.g. v3_4_9)
to "." (e.g. v4.0.4) starting at Ruby 4.0.0. The regex in
find_version_from_git_tags only matched the caller-specified
separator, so VERSION=latest and ADDITIONAL_VERSIONS resolution
silently skipped every 4.x release.

Normalize the tag list with `tr "_" "."` before matching and use "."
canonically in the regex. The `separator` parameter is no longer
consulted for matching, so drop the now-redundant `"_"` argument
from the three ruby call sites.
@rhiroe rhiroe force-pushed the fix/ruby-tag-separator-4x branch from 686a627 to 3835dff Compare May 15, 2026 14:32
@rhiroe rhiroe requested a review from Kaniska244 May 15, 2026 14:33
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.

2 participants