ruby-changes:63214
From: Benoit <ko1@a...>
Date: Wed, 30 Sep 2020 19:40:17 +0900 (JST)
Subject: [ruby-changes:63214] 8dab56ea86 (master): Update to ruby/spec@681e8cf
https://git.ruby-lang.org/ruby.git/commit/?id=8dab56ea86 From 8dab56ea862379f03d9405c75a732cd6de81a656 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Wed, 30 Sep 2020 12:39:20 +0200 Subject: Update to ruby/spec@681e8cf diff --git a/spec/ruby/core/exception/top_level_spec.rb b/spec/ruby/core/exception/top_level_spec.rb index 97a91b0..501c725 100644 --- a/spec/ruby/core/exception/top_level_spec.rb +++ b/spec/ruby/core/exception/top_level_spec.rb @@ -9,7 +9,7 @@ describe "An Exception reaching the top level" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/exception/top_level_spec.rb#L9 it "the Exception#cause is printed to STDERR with backtraces" do code = <<-RUBY def raise_cause - raise "the cause" + raise "the cause" end def raise_wrapped raise "wrapped" @@ -22,7 +22,7 @@ describe "An Exception reaching the top level" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/exception/top_level_spec.rb#L22 RUBY lines = ruby_exe(code, args: "2>&1").lines lines.reject! { |l| l.include?('rescue in') } - lines.map! { |l| l.split(':')[2..-1].join(':').chomp } + lines.map! { |l| l.chomp[/:(in.+)/, 1] } lines.should == ["in `raise_wrapped': wrapped (RuntimeError)", "in `<main>'", "in `raise_cause': the cause (RuntimeError)", diff --git a/spec/ruby/core/process/spawn_spec.rb b/spec/ruby/core/process/spawn_spec.rb index 8c544da..37a7ab9 100644 --- a/spec/ruby/core/process/spawn_spec.rb +++ b/spec/ruby/core/process/spawn_spec.rb @@ -536,12 +536,14 @@ describe "Process.spawn" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/process/spawn_spec.rb#L536 File.read(@name).should == "glarkbang" end - it "closes STDERR in the child if :err => :close" do - File.open(@name, 'w') do |file| - -> do - code = "begin; STDOUT.puts 'out'; STDERR.puts 'hello'; rescue => e; puts 'rescued'; end" - Process.wait Process.spawn(ruby_cmd(code), :out => file, :err => :close) - end.should output_to_fd("out\nrescued\n", file) + platform_is_not :windows do + it "closes STDERR in the child if :err => :close" do + File.open(@name, 'w') do |file| + -> do + code = "begin; STDOUT.puts 'out'; STDERR.puts 'hello'; rescue => e; puts 'rescued'; end" + Process.wait Process.spawn(ruby_cmd(code), :out => file, :err => :close) + end.should output_to_fd("out\nrescued\n", file) + end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/