зеркало из https://github.com/github/ruby.git
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
dd9b0df999
Коммит
4aaa5493f9
|
@ -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
|
||||
|
|
3
eval.c
3
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)
|
||||
|
|
8
io.c
8
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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче