diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 04:58:32 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 04:58:32 +0000 |
commit | fecc53f0ecbcc514a63d7f3eba3ee0342bbe870d (patch) | |
tree | 889ae8454d6b27fb4b80b87e3849630764c07ce3 /io.c | |
parent | e9650c0b077707168095891af6419ca148b94b38 (diff) |
* 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
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 |