Sha256: 661de5372e22dc44e28b8d1fc7bbb83799403d73f101fbee65e53805453958c4

Contents?: true

Size: 508 Bytes

Versions: 196

Compression:

Stored size: 508 Bytes

Contents

module Puma

  # Provides an IO-like object that always appears to contain no data.
  # Used as the value for rack.input when the request has no body.
  #
  class NullIO
    # Always returns nil
    #
    def gets
      nil
    end

    # Never yields
    #
    def each
    end

    # Mimics IO#read with no data
    #
    def read(count=nil,buffer=nil)
      (count && count > 0) ? nil : ""
    end

    # Does nothing
    #
    def rewind
    end

    # Does nothing
    #
    def close
    end
  end
end

Version data entries

196 entries across 193 versions & 19 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/null_io.rb