From bd47a8d660ab33a20c5e28d0effcc29105c434e4 Mon Sep 17 00:00:00 2001 From: Kenta Murata Date: Tue, 8 Dec 2020 15:42:31 +0900 Subject: [PATCH] test/fiddle/helper.rb: remove duplication (#3863) --- test/fiddle/helper.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb index 13bd3ed4ea..6d533122e0 100644 --- a/test/fiddle/helper.rb +++ b/test/fiddle/helper.rb @@ -55,6 +55,7 @@ when /mingw/, /mswin/ crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' libc_so = libm_so = "#{crtname}.dll" when /darwin/ + # macOS 11.0+ removed libSystem.B.dylib from /usr/lib. But It works with dlopen. libc_so = libm_so = "/usr/lib/libSystem.B.dylib" when /kfreebsd/ libc_so = "/lib/libc.so.0.1" @@ -122,11 +123,6 @@ end libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so)) libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so)) -# macOS 11.0+ removed libSystem.B.dylib from /usr/lib. But It works with dlopen. -if RUBY_PLATFORM =~ /darwin/ - libc_so = libm_so = "/usr/lib/libSystem.B.dylib" -end - if !libc_so || !libm_so ruby = EnvUtil.rubybin # When the ruby binary is 32-bit and the host is 64-bit,