Skip to content
Snippets Groups Projects
Commit 45bfd2b9 authored by ilovezfs's avatar ilovezfs
Browse files

inreplace: support for audit arg in non-block form


Provides feature parity between the block and non-block forms of
inreplace by creating a four-argument version of the non-block form,
where the fourth argument is an optional Boolean value, defaulting to
true, which specifies whether a failed inreplace should cause an
InreplaceError error to be raised. The fourth argument is passed along
to StringInreplaceExtension#gsub!, which already supports an optional
audit_result argument.

This resolves the Catch-22 that single replacements aren't permissible
in the block form (in that they now cause `brew audit` to complain), but
the audit_result argument is not available in the non-block form.

Closes #552.

Signed-off-by: default avatarilovezfs <ilovezfs@icloud.com>
parent d7ee5412
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment