1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-12-27 16:12:18 +00:00
parent f8fac84c7b
commit 76402dfa06
2 changed files with 26 additions and 4 deletions

View file

@ -7,10 +7,17 @@ script:
- 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

View file

@ -40,8 +40,21 @@ class PlatformGuard < SpecGuard
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
match &&= PlatformGuard.os?(*value)
when :wordsize
match &&= PlatformGuard.wordsize? value
when :pointer_size
match &&= PlatformGuard.pointer_size? value
end
end
match