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

ruby-changes:60550

From: Yusuke <ko1@a...>
Date: Sat, 28 Mar 2020 19:31:59 +0900 (JST)
Subject: [ruby-changes:60550] 34b0a7be0e (master): spec/ruby/library/rbconfig/rbconfig_spec.rb: restore "not windows" guard

https://git.ruby-lang.org/ruby.git/commit/?id=34b0a7be0e

From 34b0a7be0ed2fd4ca4d1d509a22964b5e61dfe34 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Sat, 28 Mar 2020 19:31:11 +0900
Subject: spec/ruby/library/rbconfig/rbconfig_spec.rb: restore "not windows"
 guard

https://github.com/ruby/ruby/runs/541455267
```
1)
RbConfig::CONFIG libdir/LIBRUBY_SO is the path to libruby and it exists if and only if ENABLE_SHARED FAILED
Expected File.exist? "d:/Ruby26-x64/lib/x64-msvcrt-ruby260.dll"
to be truthy but was false
D:/a/ruby/ruby/src/spec/ruby/library/rbconfig/rbconfig_spec.rb:46:in `block (3 levels) in <top (required)>'
D:/a/ruby/ruby/src/spec/ruby/library/rbconfig/rbconfig_spec.rb:4:in `<top (required)>'
```

diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb
index 4d6824d..0ac2f1d 100644
--- a/spec/ruby/library/rbconfig/rbconfig_spec.rb
+++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb
@@ -37,15 +37,17 @@ describe 'RbConfig::CONFIG' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/rbconfig/rbconfig_spec.rb#L37
     RUBY
   end
 
-  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']
-      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)
+  platform_is_not :windows 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']
+        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
   end
-- 
cgit v0.10.2


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

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