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

ruby-changes:49387

From: eregon <ko1@a...>
Date: Thu, 28 Dec 2017 01:12:23 +0900 (JST)
Subject: [ruby-changes:49387] eregon:r61502 (trunk): Update to ruby/mspec@5f563e4

eregon	2017-12-28 01:12:18 +0900 (Thu, 28 Dec 2017)

  New Revision: 61502

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61502

  Log:
    Update to ruby/mspec@5f563e4

  Modified files:
    trunk/spec/mspec/.travis.yml
    trunk/spec/mspec/lib/mspec/guards/platform.rb
Index: spec/mspec/.travis.yml
===================================================================
--- spec/mspec/.travis.yml	(revision 61501)
+++ spec/mspec/.travis.yml	(revision 61502)
@@ -7,10 +7,17 @@ script: https://github.com/ruby/ruby/blob/trunk/spec/mspec/.travis.yml#L7
   - bundle exec rspec
 matrix:
   include:
-  - rvm: 2.2.8
-  - rvm: 2.3.5
-  - rvm: 2.4.2
+  - rvm: 2.2.9
+  - rvm: 2.3.6
+  - rvm: 2.4.3
+  - rvm: 2.5.0
+    before_install:
+      # https://github.com/travis-ci/travis-ci/issues/8978
+      - gem update --system
   - rvm: ruby-head
+    before_install:
+      # https://github.com/travis-ci/travis-ci/issues/8978
+      - gem update --system
   - jdk: oraclejdk8
     install:
       - curl -L https://github.com/graalvm/truffleruby/releases/download/vm-enterprise-0.28/truffleruby-testing-0.28.tar.gz | tar xz
Index: spec/mspec/lib/mspec/guards/platform.rb
===================================================================
--- spec/mspec/lib/mspec/guards/platform.rb	(revision 61501)
+++ spec/mspec/lib/mspec/guards/platform.rb	(revision 61502)
@@ -40,8 +40,21 @@ class PlatformGuard < SpecGuard https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/guards/platform.rb#L40
     os?(:windows)
   end
 
+  WORD_SIZE = 1.size * 8
+
+  POINTER_SIZE = begin
+    require 'rbconfig/sizeof'
+    RbConfig::SIZEOF["void*"] * 8
+  rescue LoadError
+    WORD_SIZE
+  end
+
   def self.wordsize?(size)
-    size == 8 * 1.size
+    size == WORD_SIZE
+  end
+
+  def self.pointer_size?(size)
+    size == POINTER_SIZE
   end
 
   def initialize(*args)
@@ -61,6 +74,8 @@ class PlatformGuard < SpecGuard https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/guards/platform.rb#L74
         match &&= PlatformGuard.os?(*value)
       when :wordsize
         match &&= PlatformGuard.wordsize? value
+      when :pointer_size
+        match &&= PlatformGuard.pointer_size? value
       end
     end
     match

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

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