diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-11 08:39:37 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-11 08:39:37 +0000 |
| commit | 8e8e97feab125a4762fd260f78a0983970efb849 (patch) | |
| tree | af29f73f3331d07fa6126f7d116bf062ec58b5dd | |
| parent | c78918012c82ee0be9bad6947a1f8b75b0932407 (diff) | |
| download | ruby-8e8e97feab125a4762fd260f78a0983970efb849.tar.gz ruby-8e8e97feab125a4762fd260f78a0983970efb849.tar.xz ruby-8e8e97feab125a4762fd260f78a0983970efb849.zip | |
* test/dl/test_base.rb: decide dll name of MSVCRT from RUBY_SO_NAME on native Win32 platforms. [ruby-core:22828]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | test/dl/test_base.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/dl/test_base.rb b/test/dl/test_base.rb index 48b32cdde..d7fb354b6 100644 --- a/test/dl/test_base.rb +++ b/test/dl/test_base.rb @@ -23,9 +23,9 @@ when /linux/ end libc_so = File.join(libdir, "libc.so.6") libm_so = File.join(libdir, "libm.so.6") -when /mingw/, /mswin32/ - libc_so = "msvcrt.dll" - libm_so = "msvcrt.dll" +when /mingw/, /mswin/ + require "rbconfig" + libc_so = libm_so = RbConfig::CONFIG["RUBY_SO_NAME"].split(/-/, 2)[0] + ".dll" when /darwin/ libc_so = "/usr/lib/libc.dylib" libm_so = "/usr/lib/libm.dylib" @@ -40,8 +40,8 @@ else end end -libc_so = nil if !libc_so || !File.file?(libc_so) -libm_so = nil if !libm_so || !File.file?(libm_so) +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)) if !libc_so || !libm_so ruby = EnvUtil.rubybin |
