From 7c097dc8914e035dc4e1fb6913064e59fcb3d08c Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 10 Mar 2004 07:05:19 +0000 Subject: * 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 --- io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 3785487a88..018c74ce86 100644 --- a/io.c +++ b/io.c @@ -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; } -- cgit v1.2.3