mirror of
https://github.com/gosticks/brew.git
synced 2026-08-12 12:40:22 +00:00
rubocop: require braces for Sorbet sig
This commit is contained in:
@@ -28,10 +28,10 @@ class StringInreplaceExtension
|
||||
# Same as `String#gsub!`, but warns if nothing was replaced.
|
||||
#
|
||||
# @api public
|
||||
sig do
|
||||
sig {
|
||||
params(before: T.any(Regexp, String), after: T.nilable(String), audit_result: T::Boolean)
|
||||
.returns(T.nilable(String))
|
||||
end
|
||||
}
|
||||
def gsub!(before, after, audit_result = true) # rubocop:disable Style/OptionalBooleanParameter
|
||||
result = inreplace_string.gsub!(before, after)
|
||||
errors << "expected replacement of #{before.inspect} with #{after.inspect}" if audit_result && result.nil?
|
||||
|
||||
Reference in New Issue
Block a user