* error.c: RDoc for subclasses of Exception. [ruby-core:28394]

* cont.c: ditto

* enumerator.c: ditto

* io.c: ditto

* math.c: ditto

* numeric.c: ditto

* proc.c: ditto

* re.c: ditto

* thread.c: ditto

* transcode.c: ditto. Thanks to Run Paint for some of the documentation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2010-05-08 04:58:32 +00:00
parent e9650c0b07
commit fecc53f0ec
10 changed files with 496 additions and 2 deletions

35
io.c
View file

@ -9585,6 +9585,41 @@ rb_get_argv(void)
return ARGF.argv;
}
/*
* Document-class: IOError
*
* Raised when an IO operation fails.
*
* File.open("/etc/hosts") {|f| f << "example"}
* #=> IOError: not opened for writing
*
* File.open("/etc/hosts") {|f| f.close; f.read }
* #=> IOError: closed stream
*
* Note that some IO failures raise +SystemCallError+s and these are not
* subclasses of IOError:
*
* File.open("does/not/exist")
* #=> Errno::ENOENT: No such file or directory - does/not/exist
*/
/*
* Document-class: EOFError
*
* Raised by some IO operations when reaching the end of file. Many IO
* methods exist in two forms,
*
* one that returns +nil+ when the end of file is reached, the other
* raises EOFError +EOFError+.
*
* +EOFError+ is a subclass of +IOError+.
*
* file = File.open("/etc/hosts")
* file.read
* file.gets #=> nil
* file.readline #=> EOFError: end of file reached
*/
/*
* Document-class: ARGF
*