summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/optional/capi/spec_helper.rb')
-rw-r--r--spec/ruby/optional/capi/spec_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb
index e5d1d54daa..25658122be 100644
--- a/spec/ruby/optional/capi/spec_helper.rb
+++ b/spec/ruby/optional/capi/spec_helper.rb
@@ -21,7 +21,9 @@ def compile_extension(name)
lib = "#{object_path}/#{ext}.#{RbConfig::CONFIG['DLEXT']}"
ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h"
libruby_so = RbConfig::CONFIG['LIBRUBY_SO'] if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
-
+ if /mswin|mingw/ =~ RUBY_PLATFORM
+ libruby_so = RbConfig::CONFIG["LIBRUBY"] if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
+ end
begin
mtime = File.mtime(lib)
rescue Errno::ENOENT