diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 04:50:09 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 04:50:09 +0000 |
commit | 1dee5e34a3d397eb96db0b6bcc8e9cb9858975d0 (patch) | |
tree | 5822fdfead1635f2f78cfd0ee69bd61c217ad07f /io.c | |
parent | b140b77926a6e62228f1152157d0348ff5724f89 (diff) | |
download | ruby-1dee5e34a3d397eb96db0b6bcc8e9cb9858975d0.tar.gz |
* 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/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -9586,6 +9586,41 @@ rb_get_argv(void) } /* + * 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 * * +ARGF+ is a stream designed for use in scripts that process files given as |