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

ruby-changes:58015

From: Benoit <ko1@a...>
Date: Sun, 29 Sep 2019 23:04:59 +0900 (JST)
Subject: [ruby-changes:58015] 1c938a72aa (master): Update to ruby/spec@519df35

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

From 1c938a72aa9378f982dbc55327e86150c47b8707 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Sun, 29 Sep 2019 16:03:58 +0200
Subject: Update to ruby/spec@519df35


diff --git a/spec/ruby/.travis.yml b/spec/ruby/.travis.yml
deleted file mode 100644
index 467a5e9..0000000
--- a/spec/ruby/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0
-sudo: false
-language: ruby
-install:
-  - git clone https://github.com/ruby/mspec.git ../mspec
-script:
-  - 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
-    - rvm: 2.6.3
-    - name: RuboCop Lint Checks
-      rvm: 2.4.6
-      script:
-        - gem install rubocop:0.61.0
-        - rubocop
-branches:
-  only:
-    - master
-    - /^try/
-notifications:
-  email:
-    on_success: change
-    on_failure: change
diff --git a/spec/ruby/appveyor.yml b/spec/ruby/appveyor.yml
deleted file mode 100644
index 588172e..0000000
--- a/spec/ruby/appveyor.yml
+++ /dev/null
@@ -1,34 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0
----
-version: "{build}"
-clone_depth: 100
-init:
-  # To avoid duplicated executables in PATH, see https://github.com/ruby/spec/pull/468
-  - set PATH=C:\Ruby%ruby_version%\bin;C:\Program Files\7-Zip;C:\Program Files\AppVeyor\BuildAgent;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Program Files;C:\Windows
-  # Loads trunk build and updates MSYS2 / MinGW to most recent gcc compiler
-  - ps: |
-      if ($env:ruby_version -eq '_trunk') {
-        $trunk_uri = 'https://ci.appveyor.com/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z'
-        (New-Object Net.WebClient).DownloadFile($trunk_uri, 'C:\ruby_trunk.7z')
-        7z.exe x C:\ruby_trunk.7z -oC:\Ruby_trunk
-      }
-
-environment:
-  matrix:
-    - ruby_version: 24-x64
-    - ruby_version: 25-x64
-    - ruby_version: _trunk # So the folder name is ruby_trunk
-install:
-  - git clone https://github.com/ruby/mspec.git ../mspec
-build: off
-test_script:
-  - SET CHECK_LEAKS=true
-  - ../mspec/bin/mspec -rdevkit -ff
-on_finish:
-  - ruby -v
-matrix:
-  allow_failures:
-    - ruby_version: _trunk
-branches:
-  only:
-    - master
-    - /^try/
diff --git a/spec/ruby/core/dir/shared/open.rb b/spec/ruby/core/dir/shared/open.rb
index fb2af71..76b08dc 100644
--- a/spec/ruby/core/dir/shared/open.rb
+++ b/spec/ruby/core/dir/shared/open.rb
@@ -52,7 +52,7 @@ describe :dir_open, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/dir/shared/open.rb#L52
     options = mock("dir_open")
     options.should_receive(:to_hash).and_return({ encoding: Encoding::UTF_8 })
 
-    dir = Dir.send(@method, DirSpecs.mock_dir, options) {|d| d }
+    dir = Dir.send(@method, DirSpecs.mock_dir, **options) {|d| d }
     dir.should be_kind_of(Dir)
   end
 
diff --git a/spec/ruby/core/encoding/converter/convpath_spec.rb b/spec/ruby/core/encoding/converter/convpath_spec.rb
index 473f2db..23f1e5d 100644
--- a/spec/ruby/core/encoding/converter/convpath_spec.rb
+++ b/spec/ruby/core/encoding/converter/convpath_spec.rb
@@ -15,10 +15,10 @@ describe "Encoding::Converter#convpath" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/encoding/converter/convpath_spec.rb#L15
   end
 
   it "indicates if crlf_newline conversion would occur" do
-    ec = Encoding::Converter.new("ISo-8859-1", "EUC-JP", {crlf_newline: true})
+    ec = Encoding::Converter.new("ISo-8859-1", "EUC-JP", crlf_newline: true)
     ec.convpath.last.should == "crlf_newline"
 
-    ec = Encoding::Converter.new("ASCII", "UTF-8", {crlf_newline: false})
+    ec = Encoding::Converter.new("ASCII", "UTF-8", crlf_newline: false)
     ec.convpath.last.should_not == "crlf_newline"
   end
 end
diff --git a/spec/ruby/core/encoding/converter/new_spec.rb b/spec/ruby/core/encoding/converter/new_spec.rb
index 6a63430..9fc9726 100644
--- a/spec/ruby/core/encoding/converter/new_spec.rb
+++ b/spec/ruby/core/encoding/converter/new_spec.rb
@@ -50,7 +50,7 @@ describe "Encoding::Converter.new" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/encoding/converter/new_spec.rb#L50
   it "calls #to_hash to convert the options argument to a Hash if not a Fixnum" do
     opts = mock("encoding converter options")
     opts.should_receive(:to_hash).and_return({ replace: "fubar" })
-    conv = Encoding::Converter.new("us-ascii", "utf-8", opts)
+    conv = Encoding::Converter.new("us-ascii", "utf-8", **opts)
     conv.replacement.should == "fubar"
   end
 
diff --git a/spec/ruby/core/encoding/converter/primitive_convert_spec.rb b/spec/ruby/core/encoding/converter/primitive_convert_spec.rb
index 4a22606..802d8e7 100644
--- a/spec/ruby/core/encoding/converter/primitive_convert_spec.rb
+++ b/spec/ruby/core/encoding/converter/primitive_convert_spec.rb
@@ -85,7 +85,7 @@ describe "Encoding::Converter#primitive_convert" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/encoding/converter/primitive_convert_spec.rb#L85
   end
 
   it "accepts an options hash" do
-    @ec.primitive_convert("","",nil,nil, {after_output: true}).should == :finished
+    @ec.primitive_convert("","",nil,nil, after_output: true).should == :finished
   end
 
   it "sets the destination buffer's encoding to the destination encoding if the conversion succeeded" do
diff --git a/spec/ruby/core/encoding/converter/search_convpath_spec.rb b/spec/ruby/core/encoding/converter/search_convpath_spec.rb
index 0535e7b..0882af5 100644
--- a/spec/ruby/core/encoding/converter/search_convpath_spec.rb
+++ b/spec/ruby/core/encoding/converter/search_convpath_spec.rb
@@ -15,12 +15,10 @@ describe "Encoding::Converter.search_convpath" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/encoding/converter/search_convpath_spec.rb#L15
   end
 
   it "indicates if crlf_newline conversion would occur" do
-    cp = Encoding::Converter.search_convpath(
-      "ISO-8859-1", "EUC-JP", {crlf_newline: true})
+    cp = Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", crlf_newline: true)
     cp.last.should == "crlf_newline"
 
-    cp = Encoding::Converter.search_convpath(
-      "ASCII", "UTF-8", {crlf_newline: false})
+    cp = Encoding::Converter.search_convpath("ASCII", "UTF-8", crlf_newline: false)
     cp.last.should_not == "crlf_newline"
   end
 
diff --git a/spec/ruby/core/file/open_spec.rb b/spec/ruby/core/file/open_spec.rb
index d946fc5..b6af268 100644
--- a/spec/ruby/core/file/open_spec.rb
+++ b/spec/ruby/core/file/open_spec.rb
@@ -566,7 +566,7 @@ describe "File.open" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/open_spec.rb#L566
     options = mock("file open options")
     options.should_receive(:to_hash).and_return({ mode: "r" })
 
-    @fh = File.open(@file, options)
+    @fh = File.open(@file, **options)
   end
 
   it "accepts extra flags as a keyword argument and combine with a string mode" do
diff --git a/spec/ruby/core/hash/fetch_values_spec.rb b/spec/ruby/core/hash/fetch_values_spec.rb
index 041a3f0..af3673f 100644
--- a/spec/ruby/core/hash/fetch_values_spec.rb
+++ b/spec/ruby/core/hash/fetch_values_spec.rb
@@ -12,6 +12,10 @@ describe "Hash#fetch_values" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/hash/fetch_values_spec.rb#L12
       @hash.fetch_values(:a).should == [1]
       @hash.fetch_values(:a, :c).should == [1, 3]
     end
+
+    it "returns the values for keys ordered in the order of the requested keys" do
+      @hash.fetch_values(:c, :a).should == [3, 1]
+    end
   end
 
   describe "with unmatched keys" do
diff --git a/spec/ruby/core/io/initialize_spec.rb b/spec/ruby/core/io/initialize_spec.rb
index c8f3faf..c0d8476 100644
--- a/spec/ruby/core/io/initialize_spec.rb
+++ b/spec/ruby/core/io/initialize_spec.rb
@@ -4,7 +4,7 @@ require_relative 'fixtures/classes' https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/initialize_spec.rb#L4
 describe "IO#initialize" do
   before :each do
     @name = tmp("io_initialize.txt")
-    @io = new_io @name
+    @io = IO.new(new_fd(@name))
     @fd = @io.fileno
   end
 
diff --git a/spec/ruby/core/io/pipe_spec.rb b/spec/ruby/core/io/pipe_spec.rb
index 5b2f18d..a7dcb7f 100644
--- a/spec/ruby/core/io/pipe_spec.rb
+++ b/spec/ruby/core/io/pipe_spec.rb
@@ -179,7 +179,7 @@ describe "IO.pipe" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/pipe_spec.rb#L179
   it "calls #to_hash to convert an options argument" do
     options = mock("io pipe encoding options")
     options.should_receive(:to_hash).and_return({ invalid: :replace })
-    IO.pipe("UTF-8", "ISO-8859-1", options) { |r, w| }
+    IO.pipe("UTF-8", "ISO-8859-1", **options) { |r, w| }
   end
 
   it "calls #to_str to convert the first argument to a String" do
diff --git a/spec/ruby/core/io/read_spec.rb b/spec/ruby/core/io/read_spec.rb
index 267d840..1e9a8d2 100644
--- a/spec/ruby/core/io/read_spec.rb
+++ b/spec/ruby/core/io/read_spec.rb
@@ -24,35 +24,35 @@ describe "IO.read" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/read_spec.rb#L24
   end
 
   it "accepts an empty options Hash" do
-    IO.read(@fname, {}).should == @contents
+    IO.read(@fname, **{}).should == @contents
   end
 
   it "accepts a length, and empty options Hash" do
-    IO.read(@fname, 3, {}).should == @contents[0, 3]
+    IO.read(@fname, 3, **{}).should == @contents[0, 3]
   end
 
   it "accepts a length, offset, and empty options Hash" do
-    IO.read(@fname, 3, 0, {}).should == @contents[0, 3]
+    IO.read(@fname, 3, 0, **{}).should == @contents[0, 3]
   end
 
   it "raises an IOError if the options Hash specifies write mode" do
-    -> { IO.read(@fname, 3, 0, {mode: "w"}) }.should raise_error(IOError)
+    -> { IO.read(@fname, 3, 0, mode: "w") }.should raise_error(IOError)
   end
 
   it "raises an IOError if the options Hash specifies append only mode" do
-    -> { IO.read(@fname, {mode: "a"}) }.should raise_error(IOError)
+    -> { I (... truncated)

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

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