ruby-changes:54407
From: eregon <ko1@a...>
Date: Sat, 29 Dec 2018 09:22:37 +0900 (JST)
Subject: [ruby-changes:54407] eregon:r66621 (trunk): Update to ruby/mspec@2bd2ead
eregon 2018-12-29 09:22:31 +0900 (Sat, 29 Dec 2018) New Revision: 66621 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66621 Log: Update to ruby/mspec@2bd2ead Modified files: trunk/spec/mspec/lib/mspec/helpers/io.rb trunk/spec/mspec/tool/sync/sync-rubyspec.rb Index: spec/mspec/lib/mspec/helpers/io.rb =================================================================== --- spec/mspec/lib/mspec/helpers/io.rb (revision 66620) +++ spec/mspec/lib/mspec/helpers/io.rb (revision 66621) @@ -84,6 +84,10 @@ def new_io(name, mode="w:utf-8") https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/io.rb#L84 IO.new new_fd(name, options_or_mode(mode)), options_or_mode(mode) end +def find_unused_fd + Dir.entries("/dev/fd").map(&:to_i).max + 1 +end + # This helper simplifies passing file access modes regardless of # whether the :encoding feature is enabled. Only the access specifier # itself will be returned if :encoding is not enabled. Otherwise, Index: spec/mspec/tool/sync/sync-rubyspec.rb =================================================================== --- spec/mspec/tool/sync/sync-rubyspec.rb (revision 66620) +++ spec/mspec/tool/sync/sync-rubyspec.rb (revision 66621) @@ -160,9 +160,12 @@ def test_new_specs https://github.com/ruby/ruby/blob/trunk/spec/mspec/tool/sync/sync-rubyspec.rb#L160 require "yaml" Dir.chdir(SOURCE_REPO) do versions = YAML.load_file(".travis.yml") - versions = versions["matrix"]["include"].map { |job| job["rvm"] } - versions.delete "ruby-head" - versions.delete "system" + versions = if versions.include? "matrix" + versions["matrix"]["include"].map { |job| job["rvm"] } + else + versions["rvm"] + end + versions = versions.grep(/^\d+\./) # Test on MRI min_version, max_version = versions.minmax test_command = MSPEC ? "bundle exec rspec" : "../mspec/bin/mspec -j" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/