Widen paths type in Formula#inreplace
This commit is contained in:
parent
d1f60aea49
commit
da8a062cfc
@ -2556,7 +2556,7 @@ class Formula
|
|||||||
# @api public
|
# @api public
|
||||||
sig {
|
sig {
|
||||||
params(
|
params(
|
||||||
paths: T.any(T::Array[T.untyped], String, Pathname),
|
paths: T.any(T::Enumerable[T.untyped], String, Pathname),
|
||||||
before: T.nilable(T.any(Pathname, Regexp, String)),
|
before: T.nilable(T.any(Pathname, Regexp, String)),
|
||||||
after: T.nilable(T.any(Pathname, String, Symbol)),
|
after: T.nilable(T.any(Pathname, String, Symbol)),
|
||||||
audit_result: T::Boolean,
|
audit_result: T::Boolean,
|
||||||
@ -2566,8 +2566,7 @@ class Formula
|
|||||||
super(paths, before, after, audit_result)
|
super(paths, before, after, audit_result)
|
||||||
rescue Utils::Inreplace::Error => e
|
rescue Utils::Inreplace::Error => e
|
||||||
onoe e.to_s
|
onoe e.to_s
|
||||||
args = paths.is_a?(Array) ? paths : [paths]
|
raise BuildError.new(self, "inreplace", Array(paths), {})
|
||||||
raise BuildError.new(self, "inreplace", args, {})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user