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/core_assertions.rb | |
parent | d2166c09b08fc144123e5a7eef69b8921bfced35 (diff) |
Prevent accidental use of assert_raises
Diffstat (limited to 'tool/lib/core_assertions.rb')
-rw-r--r-- | tool/lib/core_assertions.rb | 4 |
1 files changed, 4 insertions, 0 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 |