Sha256: fab7f9f47d0afac84d6fff5630f4aba1985f1be70fd54d8d22b5a9e0a4ef35e9

Contents?: true

Size: 250 Bytes

Versions: 83

Compression:

Stored size: 250 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, = $&, '' =~ /a/
      yield(match)
    end
  end
end

Version data entries

83 entries across 70 versions & 16 rubygems

Version Path
avalara_sdk-24.12.2 vendor/bundle/ruby/2.7.0/gems/faraday-1.10.4/spec/support/fake_safe_buffer.rb
avalara_sdk-24.12.1 vendor/bundle/ruby/2.7.0/gems/faraday-1.10.4/spec/support/fake_safe_buffer.rb
avalara_sdk-24.12.0 vendor/bundle/ruby/2.7.0/gems/faraday-1.10.4/spec/support/fake_safe_buffer.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/faraday-1.10.3/spec/support/fake_safe_buffer.rb
faraday-1.10.4 spec/support/fake_safe_buffer.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/faraday-1.2.0/spec/support/fake_safe_buffer.rb
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/faraday-1.10.3/spec/support/fake_safe_buffer.rb
faraday-1.10.3 spec/support/fake_safe_buffer.rb
faraday-1.10.2 spec/support/fake_safe_buffer.rb
faraday-1.10.1 spec/support/fake_safe_buffer.rb
alloy_sdk-0.1.0 vendor/bundle/ruby/3.0.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/faraday-1.10.0/spec/support/fake_safe_buffer.rb
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/faraday-1.10.0/spec/support/fake_safe_buffer.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/faraday-1.10.0/spec/support/fake_safe_buffer.rb
faraday-1.10.0 spec/support/fake_safe_buffer.rb
plaid-14.12.1 vendor/bundle/ruby/3.0.0/gems/faraday-1.9.3/spec/support/fake_safe_buffer.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/faraday-1.9.3/spec/support/fake_safe_buffer.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/faraday-1.8.0/spec/support/fake_safe_buffer.rb
plaid-14.11.1 vendor/bundle/ruby/2.6.0/gems/faraday-1.9.3/spec/support/fake_safe_buffer.rb
faraday-1.9.3 spec/support/fake_safe_buffer.rb