mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Update Formula-Cookbook.md gsub! example
The use of a naked expression will trigger errors from `brew audit` so use instead parenthesis around the parameters as per its recommendation and to avoid ambiguous syntax.
This commit is contained in:
parent
810992a0b5
commit
e567d7f595
@ -441,7 +441,7 @@ inreplace "path", before, after
|
||||
|
||||
```ruby
|
||||
inreplace "path" do |s|
|
||||
s.gsub! /foo/, "bar"
|
||||
s.gsub!(/foo/, "bar")
|
||||
s.gsub! "123", "456"
|
||||
end
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user