Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 46ace52

Browse files
committed
Remove handle_restoration_failures
1 parent 512baf4 commit 46ace52

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/rspec/mocks/instance_method_stasher.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,12 @@ def restore
3434
@klass.__send__(:undef_method, @method)
3535
end
3636

37-
handle_restoration_failures do
38-
# In Ruby 2.4 and earlier, `define_method` is private
39-
@klass.__send__(:define_method, @method, @original_method)
40-
end
37+
# In Ruby 2.4 and earlier, `define_method` is private
38+
@klass.__send__(:define_method, @method, @original_method)
4139

4240
@original_method = nil
4341
end
4442

45-
def handle_restoration_failures
46-
# No known reasons for restoration to fail on other rubies.
47-
yield
48-
end
49-
5043
private
5144

5245
# @private

0 commit comments

Comments
 (0)