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