From 752d5cace6bf09a25776b9c9d260c24fb4e73698 Mon Sep 17 00:00:00 2001 From: Charlie Savage Date: Sat, 20 Dec 2025 21:28:09 -0800 Subject: [PATCH] FindRuby: Fix incorrect code and versions --- Modules/FindRuby.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index 649d497593..31ee5e23db 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -420,12 +420,12 @@ if (Ruby_EXECUTABLE AND NOT Ruby_VERSION_MAJOR) # check whether we found 2.[0-7].x if (${Ruby_EXECUTABLE} MATCHES "ruby2") set(Ruby_VERSION_MAJOR 2) - string(REGEX_REPLACE ${Ruby_EXECUTABLE} "ruby2\\.?([0-7])" "\\1" Ruby_VERSION_MINOR) + string(REGEX REPLACE ${Ruby_EXECUTABLE} "ruby2\\.?([0-7])" "\\1" Ruby_VERSION_MINOR) endif () - # check whether we found 3.[0-1].x + # check whether we found 3.[0-4].x if (${Ruby_EXECUTABLE} MATCHES "ruby3") set(Ruby_VERSION_MAJOR 3) - string(REGEX_REPLACE ${Ruby_EXECUTABLE} "ruby3\\.?([0-1])" "\\1" Ruby_VERSION_MINOR) + string(REGEX REPLACE ${Ruby_EXECUTABLE} "ruby3\\.?([0-4])" "\\1" Ruby_VERSION_MINOR) endif () endif ()