Skip to content

Commit

Permalink
- Re-fixed deprecation warning using stub with methods using keyword …
Browse files Browse the repository at this point in the history
…arguments.

[git-p4: depot-paths = "//src/minitest/dev/": change = 13021]
  • Loading branch information
zenspider committed Feb 15, 2021
1 parent dfbde40 commit 8a7ba81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/minitest/mock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ def stub name, val_or_callable, *block_args
end
end

metaclass.send(:ruby2_keywords, name) if metaclass.respond_to?(:ruby2_keywords, true)

yield self
ensure
metaclass.send :undef_method, name
Expand Down

0 comments on commit 8a7ba81

Please sign in to comment.