summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--eval.c3
-rw-r--r--io.c8
-rw-r--r--marshal.c3
-rw-r--r--numeric.c2
5 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 08b60a6c97..62c57b64be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Mon Aug 4 13:05:57 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (method_proc): should specify YIELD_FUNC_SVALUE.
+ [ruby-dev:21107]
+
+ * marshal.c (w_object): should not call w_extended for USRMARSHAL
+ dump. [ruby-dev:21106]
+
Mon Aug 4 10:42:00 2003 Nathaniel Talbott <ntalbott@ruby-lang.org>
* lib/test/unit/ui/console/testrunner.rb: Flushed io in the
diff --git a/eval.c b/eval.c
index d7b78d9d13..35fed14138 100644
--- a/eval.c
+++ b/eval.c
@@ -7604,6 +7604,7 @@ method_proc(method)
Data_Get_Struct(proc, struct BLOCK, bdata);
bdata->body->nd_file = mdata->body->nd_file;
nd_set_line(bdata->body, nd_line(mdata->body));
+ bdata->body->nd_state = YIELD_FUNC_SVALUE;
return proc;
}
@@ -8479,8 +8480,6 @@ rb_thread_schedule()
int need_select = 0;
int select_timeout = 0;
- if (ruby_in_compile) abort();
-
rb_thread_pending = 0;
if (curr_thread == curr_thread->next
&& curr_thread->status == THREAD_RUNNABLE)
diff --git a/io.c b/io.c
index eadaae48e2..b6dfd05c90 100644
--- a/io.c
+++ b/io.c
@@ -478,7 +478,7 @@ rb_io_tell(io)
GetOpenFile(io, fptr);
pos = io_tell(fptr);
- if (ferror(fptr->f)) rb_sys_fail(fptr->path);
+ if (pos < 0) rb_sys_fail(fptr->path);
return OFFT2NUM(pos);
}
@@ -492,7 +492,7 @@ rb_io_seek(io, offset, whence)
GetOpenFile(io, fptr);
pos = io_seek(fptr, NUM2OFFT(offset), whence);
- if (pos != 0) rb_sys_fail(fptr->path);
+ if (pos < 0) rb_sys_fail(fptr->path);
clearerr(fptr->f);
return INT2FIX(0);
@@ -1221,9 +1221,9 @@ rb_io_each_byte(io)
TRAP_END;
if (c == EOF) {
if (ferror(f)) {
+ clearerr(f);
if (!rb_io_wait_readable(fileno(f)))
rb_sys_fail(fptr->path);
- clearerr(f);
continue;
}
break;
@@ -1254,9 +1254,9 @@ rb_io_getc(io)
if (c == EOF) {
if (ferror(f)) {
+ clearerr(f);
if (!rb_io_wait_readable(fileno(f)))
rb_sys_fail(fptr->path);
- clearerr(f);
goto retry;
}
return Qnil;
diff --git a/marshal.c b/marshal.c
index c5f68bd1e8..835783958d 100644
--- a/marshal.c
+++ b/marshal.c
@@ -484,7 +484,8 @@ w_object(obj, arg, limit)
VALUE v;
v = rb_funcall(obj, s_mdump, 0, 0);
- w_class(TYPE_USRMARSHAL, obj, arg);
+ w_byte(TYPE_USRMARSHAL, arg);
+ w_unique(rb_class2name(CLASS_OF(obj)), arg);
w_object(v, arg, limit);
if (ivtbl) w_ivar(ivtbl, &c_arg);
return;
diff --git a/numeric.c b/numeric.c
index 4ea6114e38..71e4539d07 100644
--- a/numeric.c
+++ b/numeric.c
@@ -289,7 +289,7 @@ static VALUE
flo_to_s(flt)
VALUE flt;
{
- char buf[25];
+ char buf[32];
char *fmt = "%.15g";
double value = RFLOAT(flt)->value;
double avalue, d1, d2;