Skip to content

Commit 474eb9f

Browse files
committed
Use SOEXT for extension of DLL
1 parent d94c251 commit 474eb9f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/numo/linalg/autoloader.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ def load_library
6464
end
6565

6666
def detect_library_extension
67-
case RbConfig::CONFIG['host_os']
67+
# Ruby >= 2.5 provides SOEXT in rbconfig
68+
so_ext = RbConfig::CONFIG["SOEXT"]
69+
return so_ext if so_ext
70+
71+
# For Ruby < 2.5, we use RUBY_PLATFORM
72+
case RUBY_PLATFORM
6873
when /mswin|msys|mingw|cygwin/
6974
'dll'
7075
when /darwin|mac os/

0 commit comments

Comments
 (0)