diff options
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/library/rbconfig/rbconfig_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/optional/capi/spec_helper.rb | 8 |
2 files changed, 6 insertions, 6 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' diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb index 74a6325fe0..a7029a74ed 100644 --- a/spec/ruby/optional/capi/spec_helper.rb +++ b/spec/ruby/optional/capi/spec_helper.rb @@ -32,11 +32,9 @@ def compile_extension(name) ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h" if RbConfig::CONFIG["ENABLE_SHARED"] == "yes" - if PlatformGuard.windows? - libruby_so = "#{RbConfig::CONFIG['bindir']}/#{RbConfig::CONFIG['LIBRUBY_SO']}" - else - libruby_so = "#{RbConfig::CONFIG['libdir']}/#{RbConfig::CONFIG['LIBRUBY_SO']}" - end + libdirname = RbConfig::CONFIG['LIBPATHENV'] == 'PATH' ? 'bindir' : + RbConfig::CONFIG['libdirname'] # defined since 2.1 + libruby_so = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY_SO']}" end begin |