Files
news.gitea.happylizard.me/bin/gems/faraday-2.9.0/spec/support/fake_safe_buffer.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

16 lines
312 B
Ruby

# frozen_string_literal: true
# emulates ActiveSupport::SafeBuffer#gsub
FakeSafeBuffer = Struct.new(:string) do
def to_s
self
end
def gsub(regex)
string.gsub(regex) do
match, = Regexp.last_match(0), '' =~ /a/ # rubocop:disable Performance/StringInclude
yield(match)
end
end
end