1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tcltklib/tcltklib.c (ip_init): change flag value for setting 'argv' and 'argv0' variable

* ext/tk/lib/remote-tk.rb: follow changes of multi-tk.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-09-09 05:03:21 +00:00
parent a8fc3fb8b0
commit d782aad77d
3 changed files with 43 additions and 2 deletions

View file

@ -14,6 +14,17 @@ class MultiTkIp
@@TK_TABLE_LIST = [].taint unless defined?(@@TK_TABLE_LIST)
def self._IP_TABLE; @@IP_TABLE; end
def self._TK_TABLE_LIST; @@TK_TABLE_LIST; end
@flag = true
def self._DEFAULT_MASTER
# work only once
if @flag
@flag = nil
@@DEFAULT_MASTER
else
nil
end
end
end
class RemoteTkIp
@@IP_TABLE = MultiTkIp._IP_TABLE unless defined?(@@IP_TABLE)
@ -26,6 +37,15 @@ end
require 'multi-tk'
class RemoteTkIp
if defined?(@@DEFAULT_MASTER)
MultiTkIp._DEFAULT_MASTER
else
@@DEFAULT_MASTER = MultiTkIp._DEFAULT_MASTER
end
end
###############################
class << RemoteTkIp
@ -73,14 +93,19 @@ class RemoteTkIp
@threadgroup = ThreadGroup.new
@safe_level = [$SAFE]
@cmd_queue = Queue.new
=begin
@cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog()
@threadgroup.add @cmd_receiver
@threadgroup.add @receiver_watchdog
@threadgroup.enclose
=end
@@DEFAULT_MASTER.assign_receiver_and_watchdog(self)
@@IP_TABLE[@threadgroup] = self
@@TK_TABLE_LIST.size.times{
@ -94,6 +119,10 @@ class RemoteTkIp
end
@ip_id = _create_connection
class << self
undef :instance_eval
end
self.freeze # defend against modification
end