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

ruby-changes:55562

From: Benoit <ko1@a...>
Date: Sun, 28 Apr 2019 01:54:33 +0900 (JST)
Subject: [ruby-changes:55562] Benoit Daloze:a1b4816759 (trunk): Update to ruby/spec@15c9619

https://git.ruby-lang.org/ruby.git/commit/?id=a1b4816759

From a1b4816759418ca8fe510e8739622fc5d77ab0f0 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Sat, 27 Apr 2019 18:53:23 +0200
Subject: Update to ruby/spec@15c9619


diff --git a/spec/ruby/.travis.yml b/spec/ruby/.travis.yml
index 11bd7a5..467a5e9 100644
--- a/spec/ruby/.travis.yml
+++ b/spec/ruby/.travis.yml
@@ -3,20 +3,18 @@ language: ruby https://github.com/ruby/ruby/blob/trunk/spec/ruby/.travis.yml#L3
 install:
   - git clone https://github.com/ruby/mspec.git ../mspec
 script:
-  - ../mspec/bin/mspec $MSPEC_OPTS
+  - CHECK_LEAKS=true ../mspec/bin/mspec
 matrix:
   include:
+    - name: Running each spec twice
+      rvm: 2.5.5
+      script:
+        - CHECK_LEAKS=true ../mspec/bin/mspec -R2 -ff
+    - rvm: 2.4.6
     - rvm: 2.5.5
-      env: MSPEC_OPTS="-R2 -ff"
-    - rvm: 2.3.8
-    - rvm: 2.4.5
-      env: CHECK_LEAKS=true
-    - rvm: 2.5.5
-      env: CHECK_LEAKS=true
-    - rvm: 2.6.2
-      env: CHECK_LEAKS=true
-    - env: RUBOCOP=true
-      rvm: 2.4.5
+    - rvm: 2.6.3
+    - name: RuboCop Lint Checks
+      rvm: 2.4.6
       script:
         - gem install rubocop:0.61.0
         - rubocop
diff --git a/spec/ruby/CONTRIBUTING.md b/spec/ruby/CONTRIBUTING.md
index 7c9363d..dd33f7b 100644
--- a/spec/ruby/CONTRIBUTING.md
+++ b/spec/ruby/CONTRIBUTING.md
@@ -144,11 +144,11 @@ end https://github.com/ruby/ruby/blob/trunk/spec/ruby/CONTRIBUTING.md#L144
 
 
 # Combining guards
-guard -> { platform_is :windows and ruby_version_is ""..."2.3" } do
-  # Windows and RUBY_VERSION < 2.3
+guard -> { platform_is :windows and ruby_version_is ""..."2.5" } do
+  # Windows and RUBY_VERSION < 2.5
 end
 
-guard_not -> { platform_is :windows and ruby_version_is ""..."2.3" } do
+guard_not -> { platform_is :windows and ruby_version_is ""..."2.5" } do
   # The opposite
 end
 
@@ -170,20 +170,20 @@ If an implementation does not support some feature, simply tag the related specs https://github.com/ruby/ruby/blob/trunk/spec/ruby/CONTRIBUTING.md#L170
 
 ### Shared Specs
 
-Often throughout Ruby, identical functionality is used by different methods and modules. In order 
+Often throughout Ruby, identical functionality is used by different methods and modules. In order
 to avoid duplication of specs, we have shared specs that are re-used in other specs.  The use is a
 bit tricky however, so let's go over it.
 
 Commonly, if a shared spec is only reused within its own module, the shared spec will live within a
-shared directory inside that module's directory. For example, the `core/hash/shared/key.rb` spec is 
+shared directory inside that module's directory. For example, the `core/hash/shared/key.rb` spec is
 only used by `Hash` specs, and so it lives inside `core/hash/shared/`.
 
 When a shared spec is used across multiple modules or classes, it lives within the `shared/` directory.
-An example of this is the `shared/file/socket.rb` which is used by `core/file/socket_spec.rb`, 
+An example of this is the `shared/file/socket.rb` which is used by `core/file/socket_spec.rb`,
 `core/filetest/socket_spec.rb`, and `core/file/state/socket_spec.rb` and so it lives in the root `shared/`.
 
 Defining a shared spec involves adding a `shared: true` option to the top-level `describe` block. This
-will signal not to run the specs directly by the runner.  Shared specs have access to two instance 
+will signal not to run the specs directly by the runner.  Shared specs have access to two instance
 variables from the implementor spec: `@method` and `@object`, which the implementor spec will pass in.
 
 Here's an example of a snippet of a shared spec and two specs which integrates it:
diff --git a/spec/ruby/README.md b/spec/ruby/README.md
index 7cb9ada..980eaf0 100644
--- a/spec/ruby/README.md
+++ b/spec/ruby/README.md
@@ -28,8 +28,8 @@ ruby/spec is known to be tested in these implementations for every commit: https://github.com/ruby/ruby/blob/trunk/spec/ruby/README.md#L28
 * [TruffleRuby](https://github.com/oracle/truffleruby/tree/master/spec/ruby)
 * [Opal](https://github.com/opal/opal/tree/master/spec)
 
-ruby/spec describes the behavior of Ruby 2.3 and more recent Ruby versions.
-More precisely, every latest stable MRI release should [pass](https://travis-ci.org/ruby/spec) all specs of ruby/spec (2.3.x, 2.4.x, 2.5.x, 2.6.x, etc), and those are tested in TravisCI.
+ruby/spec describes the behavior of Ruby 2.4 and more recent Ruby versions.
+More precisely, every latest stable MRI release should [pass](https://travis-ci.org/ruby/spec) all specs of ruby/spec (2.4.x, 2.5.x, 2.6.x, etc), and those are tested in TravisCI.
 
 The specs are synchronized both ways around once a month by @eregon between ruby/spec, MRI, JRuby and TruffleRuby.
 Each of these repositories has a full copy of the specs under `spec/ruby` to ease editing specs.
@@ -49,6 +49,7 @@ For older specs try these commits: https://github.com/ruby/ruby/blob/trunk/spec/ruby/README.md#L49
 * Ruby 2.0.0-p647 - [Suite](https://github.com/ruby/spec/commit/245862558761d5abc676843ef74f86c9bcc8ea8d) using [MSpec](https://github.com/ruby/mspec/commit/f90efa068791064f955de7a843e96e2d7d3041c2) (may encounter 2 failures)
 * Ruby 2.1.9 - [Suite](https://github.com/ruby/spec/commit/f029e65241374386077ac500add557ae65069b55) using [MSpec](https://github.com/ruby/mspec/commit/55568ea3918c6380e64db8c567d732fa5781efed)
 * Ruby 2.2.10 - [Suite](https://github.com/ruby/spec/commit/cbaa0e412270c944df0c2532fc500c920dba0e92) using [MSpec](https://github.com/ruby/mspec/commit/d84d7668449e96856c5f6bac8cb1526b6d357ce3)
+* Ruby 2.3.8 - [Suite](https://github.com/ruby/spec/commit/dc733114d8ae66a3368ba3a98422c50147a76ba5) using [MSpec](https://github.com/ruby/mspec/commit/4599bc195fb109f2a482a01c32a7d659518369ea)
 
 ### Running the specs
 
diff --git a/spec/ruby/command_line/feature_spec.rb b/spec/ruby/command_line/feature_spec.rb
index 2025768..02571ee 100644
--- a/spec/ruby/command_line/feature_spec.rb
+++ b/spec/ruby/command_line/feature_spec.rb
@@ -37,15 +37,6 @@ describe "The --enable and --disable flags" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/feature_spec.rb#L37
     ruby_exe("p 'foo'.frozen?", options: "--disable-frozen-string-literal").chomp.should == "false"
   end
 
-  ruby_version_is "2.6" do
-    it "can be used with jit" do
-      ruby_exe("p :OK", options: "--enable=jit 2>&1").chomp.should == ":OK"
-      ruby_exe("p :OK", options: "--disable=jit 2>&1").chomp.should == ":OK"
-      ruby_exe("p :OK", options: "--enable-jit 2>&1").chomp.should == ":OK"
-      ruby_exe("p :OK", options: "--disable-jit 2>&1").chomp.should == ":OK"
-    end
-  end
-
   it "can be used with all" do
     e = "p [defined?(Gem), defined?(DidYouMean), $VERBOSE, 'foo'.frozen?]"
     env = {'RUBYOPT' => '-w'}
diff --git a/spec/ruby/core/array/concat_spec.rb b/spec/ruby/core/array/concat_spec.rb
index 985c5d8..91adb8b 100644
--- a/spec/ruby/core/array/concat_spec.rb
+++ b/spec/ruby/core/array/concat_spec.rb
@@ -110,23 +110,21 @@ describe "Array#concat" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/concat_spec.rb#L110
     ary.concat([5, 6]).should == [4, 5, 6]
   end
 
-  ruby_version_is "2.4" do
-    it "takes multiple arguments" do
-      ary = [1, 2]
-      ary.concat [3, 4]
-      ary.should == [1, 2, 3, 4]
-    end
-
-    it "concatenates the initial value when given arguments contain 2 self" do
-      ary = [1, 2]
-      ary.concat ary, ary
-      ary.should == [1, 2, 1, 2, 1, 2]
-    end
-
-    it "returns self when given no arguments" do
-      ary = [1, 2]
-      ary.concat.should equal(ary)
-      ary.should == [1, 2]
-    end
+  it "takes multiple arguments" do
+    ary = [1, 2]
+    ary.concat [3, 4]
+    ary.should == [1, 2, 3, 4]
+  end
+
+  it "concatenates the initial value when given arguments contain 2 self" do
+    ary = [1, 2]
+    ary.concat ary, ary
+    ary.should == [1, 2, 1, 2, 1, 2]
+  end
+
+  it "returns self when given no arguments" do
+    ary = [1, 2]
+    ary.concat.should equal(ary)
+    ary.should == [1, 2]
   end
 end
diff --git a/spec/ruby/core/array/max_spec.rb b/spec/ruby/core/array/max_spec.rb
index 5d0423d..329b691 100644
--- a/spec/ruby/core/array/max_spec.rb
+++ b/spec/ruby/core/array/max_spec.rb
@@ -1,10 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/max_spec.rb#L1
 require_relative '../../spec_helper'
 
 describe "Array#max" do
-  ruby_version_is "2.4" do
-    it "is defined on Array" do
-      [1].method(:max).owner.should equal Array
-    end
+  it "is defined on Array" do
+    [1].method(:max).owner.should equal Array
   end
 
   it "returns nil with no values" do
diff --git a/spec/ruby/core/array/min_spec.rb b/spec/ruby/core/array/min_spec.rb
index 903fa69..22a179d 100644
--- a/spec/ruby/core/array/min_spec.rb
+++ b/spec/ruby/core/array/min_spec.rb
@@ -1,10 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/min_spec.rb#L1
 require_relative '../../spec_helper'
 
 describe "Array#min" do
-  ruby_version_is "2.4" do
-    it "is defined on Array" do
-      [1].method(:max).owner.should equal Array
-    end
+  it "is defined on Array" do
+    [1].method(:max).owner.should equal Array
   end
 
   it "returns nil with no values" do
diff --git a/spec/ruby/core/array/pack/buffer_spec.rb b/spec/ruby/core/array/pack/buffer_spec.rb
index f2dc3e1..28b317e 100644
--- a/spec/ruby/core/array/pack/buffer_spec.rb
+++ b/spec/ruby/core/array/pack/buffer_spec.rb
@@ -2,51 +2,49 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/pack/buffer_spec.rb#L2
 
 require_relative '../../../spec_helper'
 
-ruby_version_is '2.4' do
-  describe "Array#pack with :buffer option" do
-    it "returns specified buffer" do
-      n = [ 65, 66, 67 ]
-      buffer = " "*3
-      result = n.pack("ccc", buffer: buffer)      #=> "ABC"
-      result.should equal(buffer)
-    end
+describe "Array#pack with :buffer option" do
+  it "returns specified buffer" do
+    n = [ 65, 66, 67 ]
+    buffer = " "*3
+    result (... truncated)

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

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