Sha256: 0bd8f51409a65980f988ef8b79710417b0da1bbe8bf1425f68710ad49117fc1d

Contents?: true

Size: 312 Bytes

Versions: 58

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

58 entries across 58 versions & 5 rubygems

Version Path
faraday-2.12.1 spec/support/fake_safe_buffer.rb
moneykit-0.1.15 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.14 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
faraday-2.12.0 spec/support/fake_safe_buffer.rb
faraday-2.11.0 spec/support/fake_safe_buffer.rb
moneykit-0.1.13 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.12 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.11 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
faraday-2.10.1 spec/support/fake_safe_buffer.rb
faraday-2.10.0 spec/support/fake_safe_buffer.rb
faraday-2.9.2 spec/support/fake_safe_buffer.rb
faraday-2.9.1 spec/support/fake_safe_buffer.rb
moneykit-0.1.10 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.9 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.6 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.5 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.4 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
moneykit-0.1.3 vendor/bundle/ruby/3.2.0/gems/faraday-2.7.12/spec/support/fake_safe_buffer.rb
faraday-2.9.0 spec/support/fake_safe_buffer.rb
faraday-2.8.1 spec/support/fake_safe_buffer.rb