Skip to content

Commit

Permalink
fix: rake task 'update-config' supports double-digit version segments (
Browse files Browse the repository at this point in the history
…#244)

rake-compiler does not correctly configure a ruby with a double-digit
version segment. For example, if I build 2.6.10, the `config.yml` will
contain an entry for `2.6.1`.

Previously the regexp used was

    (\d.\d.\d.)

Now the regexp is

    (\d+\.\d+\.\d+)
  • Loading branch information
flavorjones authored Dec 30, 2024
1 parent 07a4ebd commit 2509abc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/bin/cross-ruby.rake
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ task 'update-config' do
files = Dir.glob("#{USER_HOME}/ruby/*/*/**/rbconfig.rb").sort

files.each do |rbconfig|
version, platform = rbconfig.match(/.*-(\d.\d.\d).*\/([-\w]+)\/rbconfig/)[1,2]
version, platform = rbconfig.match(/.*-(\d+\.\d+\.\d+).*\/([-\w]+)\/rbconfig/)[1,2]
platforms = [platform]

# fake alternate (binary compatible) i386-mswin32-60 platform
Expand Down

0 comments on commit 2509abc

Please sign in to comment.