From f234d51eaba861edea925eabb564a0bee41b96a0 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 28 Mar 2020 00:22:51 +0100 Subject: Update to ruby/spec@ec84479 --- spec/ruby/library/rbconfig/rbconfig_spec.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'spec/ruby/library/rbconfig') 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 -- cgit v1.2.3