diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-03-28 00:22:51 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-03-28 00:22:51 +0100 |
commit | f234d51eaba861edea925eabb564a0bee41b96a0 (patch) | |
tree | 3334f36a91fe81ec704f2980ab169231f52c41d0 /spec/ruby/library/rbconfig | |
parent | 296f68816cf575b3ff920f92aec8a4109a7d81d4 (diff) |
Update to ruby/spec@ec84479
Diffstat (limited to 'spec/ruby/library/rbconfig')
-rw-r--r-- | spec/ruby/library/rbconfig/rbconfig_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb index 35b465d106..be767536fb 100644 --- a/spec/ruby/library/rbconfig/rbconfig_spec.rb +++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb @@ -28,13 +28,26 @@ describe 'RbConfig::CONFIG' do ruby_exe(<<-RUBY, options: '--enable-frozen-string-literal').should == "Done\n" require 'rbconfig' RbConfig::CONFIG.each do |k, v| - if v.frozen? + # SDKROOT excluded here to workaround the issue: https://bugs.ruby-lang.org/issues/16738 + if v.frozen? && k != 'SDKROOT' puts "\#{k} Failure" end end puts 'Done' RUBY end + + platform_is_not :windows do + it "libdir/LIBRUBY_SO is the path to libruby and it exists if and only if ENABLE_SHARED" do + if RbConfig::CONFIG['ENABLE_SHARED'] == 'yes' + libdir = RbConfig::CONFIG['libdir'] + File.should.exist?("#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}") + elsif RbConfig::CONFIG['ENABLE_SHARED'] == 'no' + libdir = RbConfig::CONFIG['libdir'] + File.should_not.exist?("#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}") + end + end + end end describe "RbConfig::TOPDIR" do |