diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-25 19:05:36 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-25 19:09:06 +0900 |
commit | f159bbd17da88a7f456e0ec7fbf7890135d456a3 (patch) | |
tree | 1d0f03142613e4cb708cbb7e14856ca0a5e014ca /tool/lib | |
parent | d2166c09b08fc144123e5a7eef69b8921bfced35 (diff) | |
download | ruby-f159bbd17da88a7f456e0ec7fbf7890135d456a3.tar.gz |
Prevent accidental use of assert_raises
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/core_assertions.rb | 4 | ||||
-rw-r--r-- | tool/lib/test/unit/assertions.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 723a1742c5..67373139ca 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -3,6 +3,10 @@ module Test module Unit module Assertions + def assert_raises(*exp, &b) + raise NoMethodError, "use assert_raise", caller + end + def _assertions= n # :nodoc: @_assertions = n end diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb index 3244913a36..b4f1dbc176 100644 --- a/tool/lib/test/unit/assertions.rb +++ b/tool/lib/test/unit/assertions.rb @@ -563,10 +563,6 @@ module Test assert yield, *msgs end - def assert_raises(*exp, &b) - raise NoMethodError, "use assert_raise", caller - end - # :call-seq: # assert_nothing_thrown( failure_message = nil, &block ) # |