mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-06 00:03:36 -04:00
* chore: RuboCop lint Layout/LeadingCommentSpace * chore: RuboCop lint Layout/EmptyLineAfterGuardClause * chore: RuboCop lint Layout/EmptyLineBetweenDefs * chore: RuboCop lint Layout/EmptyLines * chore: Regenerate RuboCop TODO
11 lines
210 B
Ruby
11 lines
210 B
Ruby
# emulates ActiveSupport::SafeBuffer#gsub
|
|
FakeSafeBuffer = Struct.new(:string) do
|
|
def to_s; self end
|
|
|
|
def gsub(regex)
|
|
string.gsub(regex) {
|
|
match, = $&, '' =~ /a/
|
|
yield(match)
|
|
}
|
|
end
|
|
end |