ruby-changes:57485
From: Nobuyoshi <ko1@a...>
Date: Mon, 2 Sep 2019 17:21:35 +0900 (JST)
Subject: [ruby-changes:57485] 8e38d4c78c (master): Rewrote using assert_separately
https://git.ruby-lang.org/ruby.git/commit/?id=8e38d4c78c From 8e38d4c78c1a9b45f604963f85995e9a817ee72c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 2 Sep 2019 16:46:28 +0900 Subject: Rewrote using assert_separately diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 713a59d..55f0d27 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -488,20 +488,15 @@ end.join https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L488 end def test_exception_in_name_error_to_str + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") bug5575 = '[ruby-core:41612]' - Tempfile.create(["test_exception_in_name_error_to_str", ".rb"]) do |t| - t.puts <<-EOC + begin; begin BasicObject.new.inspect rescue - $!.inspect - end - EOC - t.close - assert_nothing_raised(NameError, bug5575) do - load(t.path) + assert_nothing_raised(NameError, bug5575) {$!.inspect} end - end + end; end def test_equal @@ -511,19 +506,16 @@ end.join https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L506 end def test_exception_in_exception_equal + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") bug5865 = '[ruby-core:41979]' - Tempfile.create(["test_exception_in_exception_equal", ".rb"]) do |t| - t.puts <<-EOC + begin; o = Object.new def o.exception(arg) end - _ = RuntimeError.new("a") == o - EOC - t.close assert_nothing_raised(ArgumentError, bug5865) do - load(t.path) + RuntimeError.new("a") == o end - end + end; end Bug4438 = '[ruby-core:35364]' -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/