Sha256: 0bd8f51409a65980f988ef8b79710417b0da1bbe8bf1425f68710ad49117fc1d
Contents?: true
Size: 312 Bytes
Versions: 60
Compression:
Stored size: 312 Bytes
Contents
# 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
Version data entries
60 entries across 60 versions & 6 rubygems