[3379] MacRuby/trunk/ext/zlib/zlib.c
Revision: 3379 http://trac.macosforge.org/projects/ruby/changeset/3379 Author: lsansonetti@apple.com Date: 2010-01-30 19:33:31 -0800 (Sat, 30 Jan 2010) Log Message: ----------- fixed rb_rescue() call Modified Paths: -------------- MacRuby/trunk/ext/zlib/zlib.c Modified: MacRuby/trunk/ext/zlib/zlib.c =================================================================== --- MacRuby/trunk/ext/zlib/zlib.c 2010-01-31 03:20:35 UTC (rev 3378) +++ MacRuby/trunk/ext/zlib/zlib.c 2010-01-31 03:33:31 UTC (rev 3379) @@ -111,7 +111,7 @@ static void gzfile_close _((struct gzfile*, int)); static void gzfile_write_raw _((struct gzfile*)); static VALUE gzfile_read_raw_partial _((VALUE)); -static VALUE gzfile_read_raw_rescue _((VALUE)); +static VALUE gzfile_read_raw_rescue _((VALUE, VALUE)); static VALUE gzfile_read_raw _((struct gzfile*)); static int gzfile_read_raw_ensure _((struct gzfile*, int)); static char *gzfile_read_raw_until_zero _((struct gzfile*, long)); @@ -1703,14 +1703,12 @@ return str; } -VALUE rb_vm_current_exception(void); - static VALUE -gzfile_read_raw_rescue(VALUE arg) +gzfile_read_raw_rescue(VALUE arg, VALUE exc) { struct gzfile *gz = (struct gzfile*)arg; VALUE str = Qnil; - if (rb_obj_is_kind_of(rb_vm_current_exception(), rb_eNoMethodError)) { + if (rb_obj_is_kind_of(exc, rb_eNoMethodError)) { str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE)); if (!NIL_P(str)) { Check_Type(str, T_STRING);
participants (1)
-
source_changes@macosforge.org