From 224783ad1543ed1c5b9b63a3704d8df6ae1bfce6 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 2 Feb 2024 13:21:27 -0800 Subject: [PATCH] Fix extension not building on Ruby 3.2 In Ruby 3.2 it appears `CONFIG['host_os']` resolves to `$(target_os)`. Use `RbConfig::CONFIG` instead of `CONFIG`. --- extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extconf.rb b/extconf.rb index d17f926..55dcff5 100644 --- a/extconf.rb +++ b/extconf.rb @@ -14,7 +14,7 @@ else; '' end -implementation = case CONFIG['host_os'] +implementation = case RbConfig::CONFIG['host_os'] when /linux/i; 'shadow' when /sunos|solaris/i; 'shadow' when /freebsd|mirbsd|netbsd|openbsd/i; 'pwd'