mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/mspec@5f563e4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f8fac84c7b
commit
76402dfa06
2 changed files with 26 additions and 4 deletions
|
@ -7,10 +7,17 @@ script:
|
||||||
- bundle exec rspec
|
- bundle exec rspec
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- rvm: 2.2.8
|
- rvm: 2.2.9
|
||||||
- rvm: 2.3.5
|
- rvm: 2.3.6
|
||||||
- rvm: 2.4.2
|
- 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
|
- rvm: ruby-head
|
||||||
|
before_install:
|
||||||
|
# https://github.com/travis-ci/travis-ci/issues/8978
|
||||||
|
- gem update --system
|
||||||
- jdk: oraclejdk8
|
- jdk: oraclejdk8
|
||||||
install:
|
install:
|
||||||
- curl -L https://github.com/graalvm/truffleruby/releases/download/vm-enterprise-0.28/truffleruby-testing-0.28.tar.gz | tar xz
|
- curl -L https://github.com/graalvm/truffleruby/releases/download/vm-enterprise-0.28/truffleruby-testing-0.28.tar.gz | tar xz
|
||||||
|
|
|
@ -40,8 +40,21 @@ class PlatformGuard < SpecGuard
|
||||||
os?(:windows)
|
os?(:windows)
|
||||||
end
|
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)
|
def self.wordsize?(size)
|
||||||
size == 8 * 1.size
|
size == WORD_SIZE
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.pointer_size?(size)
|
||||||
|
size == POINTER_SIZE
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
|
@ -61,6 +74,8 @@ class PlatformGuard < SpecGuard
|
||||||
match &&= PlatformGuard.os?(*value)
|
match &&= PlatformGuard.os?(*value)
|
||||||
when :wordsize
|
when :wordsize
|
||||||
match &&= PlatformGuard.wordsize? value
|
match &&= PlatformGuard.wordsize? value
|
||||||
|
when :pointer_size
|
||||||
|
match &&= PlatformGuard.pointer_size? value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
match
|
match
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue