summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-10 08:21:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-10 08:21:07 +0000
commit9603e288446876c5a9f94f08ad8c123a3344c38f (patch)
tree0d2a03b24ab9e397b3168909702b0121a287147b /io.c
parentf3615ecc42d455d4453410a1c43401b06da46d38 (diff)
* eval.c (return_jump): set return value to the return
destination. separated from localjump_destination(). * eval.c (break_jump): break innermost loop (or thread or proc). * eval.c (rb_yield_0): set exit_value for block break. * eval.c (eval): Only print backtrace if generating the backtrace doesn't generate an exception. [ruby-core:02621] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/io.c b/io.c
index 637b68def9..f63dbcd120 100644
--- a/io.c
+++ b/io.c
@@ -1691,8 +1691,9 @@ rb_io_ungetc(io, c)
rb_raise(rb_eIOError, "unread stream");
rb_io_check_readable(fptr);
- if (ungetc(cc, fptr->f) == EOF && cc != EOF)
- rb_sys_fail(fptr->path);
+ if (ungetc(cc, fptr->f) == EOF && cc != EOF) {
+ rb_raise(rb_eIOError, "ungetc failed");
+ }
return Qnil;
}