diff options
author | Benoit Daloze <[email protected]> | 2020-09-30 12:39:20 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-09-30 12:39:20 +0200 |
commit | 8dab56ea862379f03d9405c75a732cd6de81a656 (patch) | |
tree | cf75dca8add2cc335d3b7c831873fc9be8d4d657 /spec/ruby/core/exception | |
parent | 31636bbddc4ac56fccdf09a815cf1915e4bec444 (diff) |
Update to ruby/spec@681e8cf
Diffstat (limited to 'spec/ruby/core/exception')
-rw-r--r-- | spec/ruby/core/exception/top_level_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/exception/top_level_spec.rb b/spec/ruby/core/exception/top_level_spec.rb index 97a91b0a58..501c7253c3 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 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 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)", |