diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-10 08:21:07 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-10 08:21:07 +0000 |
| commit | b88714dc096f539d09092124fe089d0a52bf5133 (patch) | |
| tree | 0d2a03b24ab9e397b3168909702b0121a287147b /io.c | |
| parent | b7ec4cf720c236d2d5d129ddf96edd062116819f (diff) | |
| download | ruby-b88714dc096f539d09092124fe089d0a52bf5133.tar.gz ruby-b88714dc096f539d09092124fe089d0a52bf5133.tar.xz ruby-b88714dc096f539d09092124fe089d0a52bf5133.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |
