git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-12-29 00:22:31 +00:00
Родитель 2ceebcc37b
Коммит 548defb608
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -84,6 +84,10 @@ def new_io(name, mode="w:utf-8")
IO.new new_fd(name, options_or_mode(mode)), options_or_mode(mode) IO.new new_fd(name, options_or_mode(mode)), options_or_mode(mode)
end end
def find_unused_fd
Dir.entries("/dev/fd").map(&:to_i).max + 1
end
# This helper simplifies passing file access modes regardless of # This helper simplifies passing file access modes regardless of
# whether the :encoding feature is enabled. Only the access specifier # whether the :encoding feature is enabled. Only the access specifier
# itself will be returned if :encoding is not enabled. Otherwise, # itself will be returned if :encoding is not enabled. Otherwise,

Просмотреть файл

@ -160,9 +160,12 @@ def test_new_specs
require "yaml" require "yaml"
Dir.chdir(SOURCE_REPO) do Dir.chdir(SOURCE_REPO) do
versions = YAML.load_file(".travis.yml") versions = YAML.load_file(".travis.yml")
versions = versions["matrix"]["include"].map { |job| job["rvm"] } versions = if versions.include? "matrix"
versions.delete "ruby-head" versions["matrix"]["include"].map { |job| job["rvm"] }
versions.delete "system" else
versions["rvm"]
end
versions = versions.grep(/^\d+\./) # Test on MRI
min_version, max_version = versions.minmax min_version, max_version = versions.minmax
test_command = MSPEC ? "bundle exec rspec" : "../mspec/bin/mspec -j" test_command = MSPEC ? "bundle exec rspec" : "../mspec/bin/mspec -j"