--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Reads at most length bytes from the I/O stream, or to the end of file if length is omitted or is nil. length must be a non-negative integer or nil. If the optional buffer argument is present, it must reference a String, which will receive the data.
- !ruby/struct:SM::Flow::P
body: At end of file, it returns nil or "" depend on length. ios.read() and ios.read(nil) returns "". ios.read(positive-integer) returns nil.
- !ruby/struct:SM::Flow::VERB
body: " f = File.new("testfile")\n f.read(16) #=> "This is line one"\n"
full_name: IO#read
is_singleton: false
name: read
params: |
ios.read([length [, buffer]]) => string, buffer, or nil
visibility: public