[前][次][番号順一覧][スレッド一覧]

ruby-changes:60548

From: Nobuyoshi <ko1@a...>
Date: Sat, 28 Mar 2020 16:27:33 +0900 (JST)
Subject: [ruby-changes:60548] 8c80922c82 (master): Fixed RbConfig spec for multiarch

https://git.ruby-lang.org/ruby.git/commit/?id=8c80922c82

From 8c80922c820c7cb1eddfdb8c06a067793955f09c Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 28 Mar 2020 16:10:32 +0900
Subject: Fixed RbConfig spec for multiarch


diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb
index 4decb91..4d6824d 100644
--- a/spec/ruby/library/rbconfig/rbconfig_spec.rb
+++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb
@@ -39,12 +39,13 @@ describe 'RbConfig::CONFIG' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/rbconfig/rbconfig_spec.rb#L39
 
   guard -> {RbConfig::TOPDIR} 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']}")
+      libdir = RbConfig::CONFIG[RbConfig::CONFIG['libdirname'] || 'libdir']
+      libruby_so = "#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}"
+      case RbConfig::CONFIG['ENABLE_SHARED']
+      when 'yes'
+        File.should.exist?(libruby_so)
+      when 'no'
+        File.should_not.exist?(libruby_so)
       end
     end
   end
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]