1.6.2 (to be)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-10-17 18:14:05 +00:00
parent d51bcd2007
commit 1b2d3f81ee
8 changed files with 75 additions and 17 deletions

View File

@ -1,3 +1,27 @@
Wed Oct 18 03:10:20 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.6.2 released.
Tue Oct 17 17:30:34 2000 WATANABE Hirofumi <eban@ruby-lang.org>
* eval.c (error_print): ruby_sourcefile may be NULL.
Tue Oct 17 16:36:28 2000 Wes Nakamura <wknaka@pobox.com>
* pack.c (NATINT_U32): wrong use of sizeof.
Tue Oct 17 12:48:20 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
* eval.c (rb_abort): nil check against ruby_errinfo.
* eval.c (rb_thread_schedule): use FOREACH_THREAD_FROM instead of
FOREACH_THREAD, since curr_thread may be removed from thread ring.
* eval.c (THREAD_ALLOC): errinfo should be Qnil.
* eval.c (rb_callcc): th->prev,th->next are now already
initialized in THREAD_ALLOC.
Mon Oct 16 15:37:33 2000 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> Mon Oct 16 15:37:33 2000 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* eval.c (rb_thread_inspect): tag size was shorter than required. * eval.c (rb_thread_inspect): tag size was shorter than required.
@ -27,6 +51,18 @@ Mon Oct 16 01:02:02 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (sym): symbols for class variable names. * parse.y (sym): symbols for class variable names.
Sun Oct 15 01:49:18 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* file.c (rb_file_flock): should accept interrupt.
* process.c (rb_waitpid): ditto.
* process.c (rb_waitpid): ditto.
* process.c (proc_wait): ditto.
* process.c (proc_waitpid2): wrong recursion.
Sat Oct 14 03:32:13 2000 Yukihiro Matsumoto <matz@ruby-lang.org> Sat Oct 14 03:32:13 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_thread_alloc): should not link a new thread in the * eval.c (rb_thread_alloc): should not link a new thread in the

15
eval.c
View File

@ -882,7 +882,10 @@ error_print()
} }
POP_TAG(); POP_TAG();
if (NIL_P(errat)) { if (NIL_P(errat)) {
fprintf(stderr, "%s:%d", ruby_sourcefile, ruby_sourceline); if (ruby_sourcefile)
fprintf(stderr, "%s:%d", ruby_sourcefile, ruby_sourceline);
else
fprintf(stderr, "%d", ruby_sourceline);
} }
else { else {
VALUE mesg = RARRAY(errat)->ptr[0]; VALUE mesg = RARRAY(errat)->ptr[0];
@ -3224,7 +3227,7 @@ rb_f_exit(argc, argv, obj)
static void static void
rb_abort() rb_abort()
{ {
if (ruby_errinfo) { if (!NIL_P(ruby_errinfo)) {
error_print(); error_print();
} }
rb_exit(1); rb_exit(1);
@ -7110,7 +7113,7 @@ rb_thread_schedule()
if (n < 0) { if (n < 0) {
if (rb_trap_pending) rb_trap_exec(); if (rb_trap_pending) rb_trap_exec();
if (errno == EINTR) goto again; if (errno == EINTR) goto again;
FOREACH_THREAD(th) { FOREACH_THREAD_FROM(curr, th) {
if (th->wait_for & WAIT_SELECT) { if (th->wait_for & WAIT_SELECT) {
int v = 0; int v = 0;
@ -7123,7 +7126,7 @@ rb_thread_schedule()
} }
} }
} }
END_FOREACH(th); END_FOREACH_FROM(curr, th);
} }
if (n > 0) { if (n > 0) {
now = -1.0; now = -1.0;
@ -7638,7 +7641,6 @@ rb_thread_abort_exc_set(thread, val)
\ \
th->status = THREAD_RUNNABLE;\ th->status = THREAD_RUNNABLE;\
th->result = 0;\ th->result = 0;\
th->errinfo = Qnil;\
\ \
th->stk_ptr = 0;\ th->stk_ptr = 0;\
th->stk_len = 0;\ th->stk_len = 0;\
@ -7659,7 +7661,7 @@ rb_thread_abort_exc_set(thread, val)
th->iter = 0;\ th->iter = 0;\
th->tag = 0;\ th->tag = 0;\
th->tracing = 0;\ th->tracing = 0;\
th->errinfo = 0;\ th->errinfo = Qnil;\
th->last_status = 0;\ th->last_status = 0;\
th->last_line = 0;\ th->last_line = 0;\
th->last_match = 0;\ th->last_match = 0;\
@ -8205,7 +8207,6 @@ rb_callcc(self)
for (tag=prot_tag; tag; tag=tag->prev) { for (tag=prot_tag; tag; tag=tag->prev) {
scope_dup(tag->scope); scope_dup(tag->scope);
} }
th->prev = th->next = 0;
th->thread = curr_thread->thread; th->thread = curr_thread->thread;
for (vars = th->dyna_vars; vars; vars = vars->next) { for (vars = th->dyna_vars; vars; vars = vars->next) {

6
file.c
View File

@ -1530,6 +1530,7 @@ rb_file_flock(obj, operation)
{ {
#ifndef __CHECKER__ #ifndef __CHECKER__
OpenFile *fptr; OpenFile *fptr;
int ret;
rb_secure(2); rb_secure(2);
GetOpenFile(obj, fptr); GetOpenFile(obj, fptr);
@ -1537,7 +1538,10 @@ rb_file_flock(obj, operation)
if (fptr->mode & FMODE_WRITABLE) { if (fptr->mode & FMODE_WRITABLE) {
fflush(GetWriteFile(fptr)); fflush(GetWriteFile(fptr));
} }
if (flock(fileno(fptr->f), NUM2INT(operation)) < 0) { TRAP_BEG;
ret = flock(fileno(fptr->f), NUM2INT(operation));
TRAP_END;
if (ret < 0) {
#ifdef EWOULDBLOCK #ifdef EWOULDBLOCK
if (errno == EWOULDBLOCK) { if (errno == EWOULDBLOCK) {
return Qfalse; return Qfalse;

View File

@ -52,7 +52,8 @@ class CGI
request.instance_eval do request.instance_eval do
@output_hidden = {session_key => id} @output_hidden = {session_key => id}
@output_cookies = [ @output_cookies = [
Cookie::new(session_key => id, Cookie::new("name" => session_key,
"value" => id,
"path" => if ENV["SCRIPT_NAME"] then "path" => if ENV["SCRIPT_NAME"] then
File::dirname(ENV["SCRIPT_NAME"]) File::dirname(ENV["SCRIPT_NAME"])
else else
@ -84,6 +85,10 @@ class CGI
@dbman.update @dbman.update
end end
def close
@dbman.close
end
def delete def delete
@dbman.delete @dbman.delete
end end

11
pack.c
View File

@ -24,8 +24,8 @@
#ifdef NATINT_PACK #ifdef NATINT_PACK
# define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16))) # define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16)))
# define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32))) # define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32)))
# define NATINT_I32(x) (natint?sizeof(NUM2LONG(x)):(NUM2I32(x))) # define NATINT_I32(x) (natint?NUM2LONG(x):(NUM2I32(x)))
# define NATINT_U32(x) (natint?sizeof(NUM2ULONG(x)):(NUM2U32(x))) # define NATINT_U32(x) (natint?NUM2ULONG(x):(NUM2U32(x)))
# define NATINT_LEN(type,len) (natint?sizeof(type):(len)) # define NATINT_LEN(type,len) (natint?sizeof(type):(len))
# ifdef WORDS_BIGENDIAN # ifdef WORDS_BIGENDIAN
# define OFF16(p) OFF16B(p) # define OFF16(p) OFF16B(p)
@ -38,12 +38,15 @@
#endif #endif
#ifndef OFF16 #ifndef OFF16
# define OFF16B(p) (char*)(p)
# define OFF32B(p) (char*)(p)
# define OFF16(p) (char*)(p) # define OFF16(p) (char*)(p)
# define OFF32(p) (char*)(p) # define OFF32(p) (char*)(p)
#endif #endif
#ifndef OFF16B
# define OFF16B(p) (char*)(p)
# define OFF32B(p) (char*)(p)
#endif
#define define_swapx(x, xtype) \ #define define_swapx(x, xtype) \
static xtype \ static xtype \
TOKEN_PASTE(swap,x)(z) \ TOKEN_PASTE(swap,x)(z) \

View File

@ -86,11 +86,13 @@ rb_waitpid(pid, flags, st)
} }
retry: retry:
TRAP_BEG;
#ifdef HAVE_WAITPID #ifdef HAVE_WAITPID
result = waitpid(pid, st, flags); result = waitpid(pid, st, flags);
#else /* HAVE_WAIT4 */ #else /* HAVE_WAIT4 */
result = wait4(pid, st, flags, NULL); result = wait4(pid, st, flags, NULL);
#endif #endif
TRAP_END;
if (result < 0) { if (result < 0) {
if (errno == EINTR) { if (errno == EINTR) {
rb_thread_polling(); rb_thread_polling();
@ -116,7 +118,9 @@ rb_waitpid(pid, flags, st)
} }
for (;;) { for (;;) {
TRAP_BEG;
result = wait(st); result = wait(st);
TRAP_END;
if (result < 0) { if (result < 0) {
if (errno == EINTR) { if (errno == EINTR) {
rb_thread_schedule(); rb_thread_schedule();
@ -170,7 +174,11 @@ proc_wait()
return INT2FIX(data.pid); return INT2FIX(data.pid);
} }
while ((pid = wait(&state)) < 0) { while (1) {
TRAP_BEG;
pid = wait(&state);
TRA_END;
if (pid >= 0) break;
if (errno == EINTR) { if (errno == EINTR) {
rb_thread_schedule(); rb_thread_schedule();
continue; continue;
@ -218,7 +226,7 @@ proc_waitpid2(argc, argv)
int argc; int argc;
VALUE *argv; VALUE *argv;
{ {
VALUE pid = proc_waitpid2(argc, argv); VALUE pid = proc_waitpid(argc, argv);
return rb_assoc_new(pid, rb_last_status); return rb_assoc_new(pid, rb_last_status);
} }

1
time.c
View File

@ -1098,6 +1098,7 @@ Init_Time()
rb_define_method(rb_cTime, "wday", time_wday, 0); rb_define_method(rb_cTime, "wday", time_wday, 0);
rb_define_method(rb_cTime, "yday", time_yday, 0); rb_define_method(rb_cTime, "yday", time_yday, 0);
rb_define_method(rb_cTime, "isdst", time_isdst, 0); rb_define_method(rb_cTime, "isdst", time_isdst, 0);
rb_define_method(rb_cTime, "dst?", time_isdst, 0);
rb_define_method(rb_cTime, "zone", time_zone, 0); rb_define_method(rb_cTime, "zone", time_zone, 0);
rb_define_method(rb_cTime, "utc?", time_utc_p, 0); rb_define_method(rb_cTime, "utc?", time_utc_p, 0);

View File

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.2" #define RUBY_VERSION "1.6.2"
#define RUBY_RELEASE_DATE "2000-10-16" #define RUBY_RELEASE_DATE "2000-10-18"
#define RUBY_VERSION_CODE 162 #define RUBY_VERSION_CODE 162
#define RUBY_RELEASE_CODE 20001016 #define RUBY_RELEASE_CODE 20001018