Add `methodswith` for #1762.
Merge pull request #2465 from tshort/methodswith2

Add `methodswith` for #1762.