mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* array.c (rb_ary_and): should not push frozen key string.
* array.c (rb_ary_or): ditto. * eval.c (rb_thread_schedule): should save context before raising deadlock, saved context for current thread might be obsolete. * time.c (make_time_t): non DST timezone shift supported (hopefully). * signal.c: SIGINFO added. * eval.c (rb_ensure): should not SEGV when prot_tag is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
91fdbecbda
commit
be256c6f5a
7 changed files with 50 additions and 18 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
Tue May 15 17:46:37 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* array.c (rb_ary_and): should not push frozen key string.
|
||||
|
||||
* array.c (rb_ary_or): ditto.
|
||||
|
||||
Mon May 14 13:50:22 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_thread_schedule): should save context before raising
|
||||
deadlock, saved context for current thread might be obsolete.
|
||||
|
||||
* time.c (make_time_t): non DST timezone shift supported (hopefully).
|
||||
|
||||
Mon May 14 11:54:20 2001 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* signal.c: SIGINFO added.
|
||||
|
||||
Mon May 14 08:57:06 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_ensure): should not SEGV when prot_tag is NULL.
|
||||
|
||||
Sun May 13 23:49:25 2001 Usaku Nakamura <usa@osb.att.ne.jp>
|
||||
|
||||
* win32/resource.rb: Modify copyright in resource script.
|
||||
|
|
6
array.c
6
array.c
|
@ -1468,7 +1468,7 @@ rb_ary_and(ary1, ary2)
|
|||
for (i=0; i<RARRAY(ary1)->len; i++) {
|
||||
VALUE v = RARRAY(ary1)->ptr[i];
|
||||
if (st_delete(RHASH(hash)->tbl, &v, 0)) {
|
||||
rb_ary_push(ary3, v);
|
||||
rb_ary_push(ary3, RARRAY(ary1)->ptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1490,13 +1490,13 @@ rb_ary_or(ary1, ary2)
|
|||
for (i=0; i<RARRAY(ary1)->len; i++) {
|
||||
v = RARRAY(ary1)->ptr[i];
|
||||
if (st_delete(RHASH(hash)->tbl, &v, 0)) {
|
||||
rb_ary_push(ary3, v);
|
||||
rb_ary_push(ary3, RARRAY(ary1)->ptr[i]);
|
||||
}
|
||||
}
|
||||
for (i=0; i<RARRAY(ary2)->len; i++) {
|
||||
v = RARRAY(ary2)->ptr[i];
|
||||
if (st_delete(RHASH(hash)->tbl, &v, 0)) {
|
||||
rb_ary_push(ary3, v);
|
||||
rb_ary_push(ary3, RARRAY(ary1)->ptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
dln.c
2
dln.c
|
@ -1204,7 +1204,7 @@ aix_loaderror(const char *pathname)
|
|||
if (nerr == load_errtab[i].errno && load_errtab[i].errstr)
|
||||
ERRBUF_APPEND(load_errtab[i].errstr);
|
||||
}
|
||||
while (ISDIGIT(*message[i])) message[i]++;
|
||||
while (isdigit(*message[i])) message[i]++;
|
||||
ERRBUF_APPEND(message[i]);
|
||||
ERRBUF_APPEND("\n");
|
||||
}
|
||||
|
|
5
eval.c
5
eval.c
|
@ -3991,9 +3991,9 @@ rb_ensure(b_proc, data1, e_proc, data2)
|
|||
result = (*b_proc)(data1);
|
||||
}
|
||||
POP_TAG();
|
||||
retval = prot_tag->retval; /* save retval */
|
||||
retval = prot_tag ? prot_tag->retval : Qnil; /* save retval */
|
||||
(*e_proc)(data2);
|
||||
return_value(retval);
|
||||
if (prot_tag) return_value(retval);
|
||||
|
||||
if (state) JUMP_TAG(state);
|
||||
return result;
|
||||
|
@ -7538,6 +7538,7 @@ rb_thread_schedule()
|
|||
next->gid = 0;
|
||||
rb_thread_ready(next);
|
||||
next->status = THREAD_TO_KILL;
|
||||
rb_thread_save_context(curr_thread);
|
||||
rb_thread_deadlock();
|
||||
}
|
||||
next->wait_for = 0;
|
||||
|
|
|
@ -170,7 +170,7 @@ class Queue
|
|||
Thread.critical = true
|
||||
begin
|
||||
loop do
|
||||
if @que.length == 0
|
||||
if @que.empty?
|
||||
if non_block
|
||||
raise ThreadError, "queue empty"
|
||||
end
|
||||
|
@ -184,13 +184,11 @@ class Queue
|
|||
Thread.critical = false
|
||||
end
|
||||
end
|
||||
def shift(non_block=false)
|
||||
pop(non_block)
|
||||
end
|
||||
alias deq shift
|
||||
alias shift pop
|
||||
alias deq pop
|
||||
|
||||
def empty?
|
||||
@que.length == 0
|
||||
@que.empty?
|
||||
end
|
||||
|
||||
def clear
|
||||
|
@ -223,11 +221,11 @@ class SizedQueue<Queue
|
|||
|
||||
def max=(max)
|
||||
Thread.critical = true
|
||||
if max >= @max
|
||||
if max <= @max
|
||||
@max = max
|
||||
Thread.critical = false
|
||||
else
|
||||
diff = max - @max
|
||||
diff = @max - max
|
||||
@max = max
|
||||
Thread.critical = false
|
||||
diff.times do
|
||||
|
@ -253,6 +251,7 @@ class SizedQueue<Queue
|
|||
end
|
||||
|
||||
def pop(*args)
|
||||
retval = super
|
||||
Thread.critical = true
|
||||
if @que.length < @max
|
||||
begin
|
||||
|
@ -265,7 +264,7 @@ class SizedQueue<Queue
|
|||
end
|
||||
t.run if t
|
||||
end
|
||||
super
|
||||
retval
|
||||
end
|
||||
|
||||
def num_waiting
|
||||
|
|
3
signal.c
3
signal.c
|
@ -162,6 +162,9 @@ static struct signals {
|
|||
#endif
|
||||
#ifdef SIGSOUND
|
||||
"SOUND", SIGSOUND,
|
||||
#endif
|
||||
#ifdef SIGINFO
|
||||
"INFO", SIGINFO,
|
||||
#endif
|
||||
NULL, 0,
|
||||
};
|
||||
|
|
14
time.c
14
time.c
|
@ -353,11 +353,19 @@ make_time_t(tptr, utc_or_local)
|
|||
tm = localtime(&guess);
|
||||
if (!tm) goto error;
|
||||
if (lt.tm_isdst != tm->tm_isdst || tptr->tm_hour != tm->tm_hour) {
|
||||
oguess = guess - 3600;
|
||||
tm = localtime(&oguess);
|
||||
time_t tmp = guess - 3600;
|
||||
tm = localtime(&tmp);
|
||||
if (!tm) goto error;
|
||||
if (tptr->tm_hour == tm->tm_hour) {
|
||||
guess = oguess;
|
||||
guess = tmp;
|
||||
}
|
||||
else if (lt.tm_isdst == tm->tm_isdst) {
|
||||
tmp = guess + 3600;
|
||||
tm = localtime(&tmp);
|
||||
if (!tm) goto error;
|
||||
if (tptr->tm_hour == tm->tm_hour) {
|
||||
guess = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (guess < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue