--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: Opens the file, optionally seeks to the given offset, then returns <em>length</em> bytes (defaulting to the rest of the file). <tt>read</tt> ensures the file is closed before returning.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "If the last argument is a hash, it specifies option for internal open(). The key would be the following. open_args: is exclusive to others."
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: " encoding: string or encoding\n\n  specifies encoding of the read string.  encoding will be ignored\n  if length is specified.\n\n mode: string\n\n  specifies mode argument for open().  it should start with &quot;r&quot;\n  otherwise it would cause error.\n\n open_args: array of strings\n\n  specifies arguments for open() as an array.\n\n   IO.read(&quot;testfile&quot;)           #=&gt; &quot;This is line one\\nThis is line two\\nThis is line three\\nAnd so on...\\n&quot;\n   IO.read(&quot;testfile&quot;, 20)       #=&gt; &quot;This is line one\\nThi&quot;\n   IO.read(&quot;testfile&quot;, 20, 10)   #=&gt; &quot;ne one\\nThis is line &quot;\n"
full_name: IO::read
is_singleton: true
name: read
params: |
  IO.read(name, [length [, offset]] )   => string
  IO.read(name, [length [, offset]], open_args)   => string

visibility: public
