diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-03-29 00:14:51 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-04-04 11:18:25 +0900 |
commit | 146330906f0f1cada9179b2b57501e2b64aa5eed (patch) | |
tree | a9286af428999d01a60622281c25418488045f99 /spec/ruby/library/rbconfig/rbconfig_spec.rb | |
parent | 4a716455652d9924d8ef9b0a1527cb0bef90ee2f (diff) |
Fixed the location of the shared library
On platform where searchs shared libraries by `PATH` environment
variable (i.e., Windows), the shared library is installed in
`bindir`. On other platforms, the library directory is directed
by `libdirname` indirectly.
Diffstat (limited to 'spec/ruby/library/rbconfig/rbconfig_spec.rb')
-rw-r--r-- | spec/ruby/library/rbconfig/rbconfig_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb index 4d6824dfb4..f88dc673e5 100644 --- a/spec/ruby/library/rbconfig/rbconfig_spec.rb +++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb @@ -39,7 +39,9 @@ describe 'RbConfig::CONFIG' do guard -> {RbConfig::TOPDIR} do it "libdir/LIBRUBY_SO is the path to libruby and it exists if and only if ENABLE_SHARED" do - libdir = RbConfig::CONFIG[RbConfig::CONFIG['libdirname'] || 'libdir'] + libdirname = RbConfig::CONFIG['LIBPATHENV'] == 'PATH' ? 'bindir' : + RbConfig::CONFIG['libdirname'] + libdir = RbConfig::CONFIG[libdirname] libruby_so = "#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}" case RbConfig::CONFIG['ENABLE_SHARED'] when 'yes' |