Sha256: c98da30878784095e4d17a68b8ff1d05d6ceff358b96fa86241b1e8e6e353a53

Contents?: true

Size: 450 Bytes

Versions: 84

Compression:

Stored size: 450 Bytes

Contents

class Gem::StringSink
  def initialize
    @string = ""
  end

  attr_reader :string

  def write(s)
    @string += s
    s.size
  end

  def set_encoding(enc)
    @string.force_encoding enc
  end
end

class Gem::StringSource
  def initialize(str)
    @string = str.dup
  end

  def read(count=nil)
    if count
      @string.slice!(0,count)
    else
      s = @string
      @string = ""
      s
    end
  end

  alias_method :readpartial, :read
end

Version data entries

84 entries across 56 versions & 4 rubygems

Version Path
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/util/stringio.rb