diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-10 07:05:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-10 07:05:19 +0000 |
commit | 7c097dc8914e035dc4e1fb6913064e59fcb3d08c (patch) | |
tree | 9832727d5254de4909d2e1a2a5e497bb06c5d8e9 /io.c | |
parent | 86e988a55596ab35e48a39fff4638afdb619fbc7 (diff) | |
download | ruby-7c097dc8914e035dc4e1fb6913064e59fcb3d08c.tar.gz |
* struct.c (rb_struct_s_def): Struct::new executes block with
generated struct class. [ruby-talk:02606]
* io.c (rb_io_ungetc): raise IOError instead of calling
rb_sys_fail(). [ruby-talk:23181]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1696,8 +1696,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; } |