Sha256: fab7f9f47d0afac84d6fff5630f4aba1985f1be70fd54d8d22b5a9e0a4ef35e9

Contents?: true

Size: 250 Bytes

Versions: 79

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

79 entries across 66 versions & 15 rubygems

Version Path
faraday-1.1.0 spec/support/fake_safe_buffer.rb
passbase-1.0.2 vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
passbase-1.0.1 vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
passbase-1.0.0 vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
logstash-output-scalyr-0.1.5 vendor/bundle/jruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
files.com-1.0.1 vendor/bundle/ruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
logstash-output-scalyr-0.1.4 vendor/bundle/jruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
logstash-output-scalyr-0.1.3 vendor/bundle/jruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
tdiary-5.1.2 vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
logstash-output-scalyr-0.1.2 vendor/bundle/jruby/2.5.0/gems/faraday-1.0.1/spec/support/fake_safe_buffer.rb
faraday-1.0.1 spec/support/fake_safe_buffer.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/faraday-1.0.0/spec/support/fake_safe_buffer.rb
faraday-1.0.0 spec/support/fake_safe_buffer.rb