aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-23 08:11:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-23 08:11:21 +0000
commitcec20793cb3dd76ea310b443171e22e24e484247 (patch)
tree1a25141e5bc6ba282176cd81489f3eac7267582a
parent228604473da9819e031ea2b48017f9246d1dbd48 (diff)
downloadruby-cec20793cb3dd76ea310b443171e22e24e484247.tar.gz
* eval.c (ruby_finalize): turn off ruby_debug flag before calling
at_exit procs and finalizers. (ruby-bugs-ja:PR473) * ext/tcltklib/tcltklib.c (lib_mainloop_core): OK to block if there's no other thread. (ruby-bugs:PR#861) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--eval.c1
-rw-r--r--ext/tcltklib/tcltklib.c6
-rw-r--r--ext/tk/lib/tk.rb2
4 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3207b2a717..563feddf7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,14 @@ Fri May 23 15:16:16 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* pack.c (pack_unpack): sign-extend if sizeof long is bigger than
32. (ruby-bugs-ja:PR#472)
+Fri May 23 14:19:29 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (ruby_finalize): turn off ruby_debug flag before calling
+ at_exit procs and finalizers. (ruby-bugs-ja:PR473)
+
+ * ext/tcltklib/tcltklib.c (lib_mainloop_core): OK to block if
+ there's no other thread. (ruby-bugs:PR#861)
+
Thu May 22 18:07:46 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
* lib/token.c: single- and double-quoted root-level fix.
diff --git a/eval.c b/eval.c
index 846107d94b..2e09d9b41d 100644
--- a/eval.c
+++ b/eval.c
@@ -1309,6 +1309,7 @@ ruby_finalize()
{
int state;
+ ruby_debug = Qfalse;
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
rb_trap_exit();
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index 95abb5a8c1..41c3a2d314 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -58,7 +58,6 @@ struct invoke_queue {
VALUE thread;
};
-static VALUE main_thread;
static VALUE eventloop_thread;
static VALUE watchdog_thread;
Tcl_Interp *current_interp;
@@ -151,7 +150,7 @@ set_eventloop_weight(self, loop_max, no_event)
int no_ev = NUM2INT(no_event);
if (lpmax <= 0 || no_ev <= 0) {
- rb_raise(rb_eArgError, "weight parameters must be plus number");
+ rb_raise(rb_eArgError, "weight parameters must be positive numbers");
}
event_loop_max = lpmax;
@@ -185,7 +184,7 @@ lib_mainloop_core(check_root_widget)
for(;;) {
tick_counter = 0;
while(tick_counter < event_loop_max) {
- if (Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT)) {
+ if (Tcl_DoOneEvent(TCL_ALL_EVENTS | (rb_thread_alone() ? 0 : TCL_DONT_WAIT))) {
tick_counter++;
} else {
tick_counter += no_event_tick;
@@ -886,7 +885,6 @@ Init_tcltklib()
rb_define_method(ip, "get_eventloop_weight", get_eventloop_weight, 0);
rb_define_method(ip, "restart", lib_restart, 0);
- main_thread = rb_thread_current();
eventloop_thread = 0;
watchdog_thread = 0;
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 0ffb0ee434..9a156eed02 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -354,7 +354,7 @@ module TkComm
})
id + " " + args
else
- id = install_cmd(proc{|arg|
+ id = install_cmd(proc{|*arg|
TkUtil.eval_cmd cmd, Event.new(*arg)
})
id + ' %# %a %b %c %d %f %h %k %m %o %p %s %t %w %x %y' +