As articulated by Stuart Sierra, the use of function parameters that may either be collections or singletons is an anti-pattern, yet that's exactly how grep and greplace! are implemented, for exactly the reason the article decries (convenience).
Although the fix is technically trivial, it does break backwards compatibility, so this will require some research to try to identify downstream users of the library, and then outreach to those projects' maintainers to ask them whether this fix is worth the pain it will inflict on them.
As articulated by Stuart Sierra, the use of function parameters that may either be collections or singletons is an anti-pattern, yet that's exactly how
grepandgreplace!are implemented, for exactly the reason the article decries (convenience).Although the fix is technically trivial, it does break backwards compatibility, so this will require some research to try to identify downstream users of the library, and then outreach to those projects' maintainers to ask them whether this fix is worth the pain it will inflict on them.