diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-07 01:33:12 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-07 01:33:12 +0000 |
commit | f0745774cf53499e93b787ce7eff234bb2f6af09 (patch) | |
tree | 9a7ec1397541fdab02f1bc36344039244ded94ef /ext/tk/lib | |
parent | e5222f7d34b8b0416816d30f1ddffe637d77b8df (diff) | |
download | ruby-f0745774cf53499e93b787ce7eff234bb2f6af09.tar.gz ruby-f0745774cf53499e93b787ce7eff234bb2f6af09.tar.xz ruby-f0745774cf53499e93b787ce7eff234bb2f6af09.zip |
* ext/tk/lib/multi-tk.rb: slave-ip fails to call procedures
delegated by master-ip.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
-rw-r--r-- | ext/tk/lib/multi-tk.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/ext/tk/lib/multi-tk.rb b/ext/tk/lib/multi-tk.rb index b5519af3c..6d048e91b 100644 --- a/ext/tk/lib/multi-tk.rb +++ b/ext/tk/lib/multi-tk.rb @@ -1333,7 +1333,7 @@ class MultiTkIp #self.eval_callback{ TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *args)) } #ret = self.eval_callback{ TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *args)) } ret = self.eval_callback(*args){|safe, *params| - $SAFE=safe + $SAFE=safe if $SAFE < safe TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params)) } if ret.kind_of?(Exception) @@ -1511,7 +1511,7 @@ class MultiTkIp else eval_proc_core(true, proc{|safe, *params| - $SAFE=safe + $SAFE=safe if $SAFE < safe Thread.new(*params, &cmd).value }, *args) @@ -1530,7 +1530,8 @@ class MultiTkIp Thread.new{ eval_proc_core(false, proc{|safe, *params| - $SAFE=safe; Thread.new(*params, &cmd).value + $SAFE=safe if $SAFE < safe + Thread.new(*params, &cmd).value }, *args) } @@ -1545,7 +1546,11 @@ class MultiTkIp raise RuntimeError, "A String object is expected for the 'cmd' argument" end - eval_proc_core(true, proc{|safe| $SAFE=safe; Kernel.eval(cmd, *eval_args)}) + eval_proc_core(true, + proc{|safe| + $SAFE=safe if $SAFE < safe + Kernel.eval(cmd, *eval_args) + }) end alias eval_str eval_string @@ -1556,7 +1561,10 @@ class MultiTkIp end Thread.new{ eval_proc_core(true, - proc{|safe| $SAFE=safe; Kernel.eval(cmd, *eval_args)}) + proc{|safe| + $SAFE=safe if $SAFE < safe + Kernel.eval(cmd, *eval_args) + }) } end alias background_eval_string bg_eval_string |