aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-15 11:24:22 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-15 11:24:22 +0000
commit3c3785918674ffab7fb3c66fbeec26bd721c6a4f (patch)
tree34a2010ddb20a32c9c2398a09365b7012e4a24fb /ext/tk
parent011a8516963e68a348d695064d686b80fb93b9fa (diff)
downloadruby-3c3785918674ffab7fb3c66fbeec26bd721c6a4f.tar.gz
* ext/tk/lib/tkoptdb-safeTk.rb: fix a bug depend on the changes of MultiTkIp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/sample/tkoptdb-safeTk.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/tk/sample/tkoptdb-safeTk.rb b/ext/tk/sample/tkoptdb-safeTk.rb
index b41c856d5a..f6c3ca4ee7 100644
--- a/ext/tk/sample/tkoptdb-safeTk.rb
+++ b/ext/tk/sample/tkoptdb-safeTk.rb
@@ -26,6 +26,7 @@ else
ent = TkOptionDB.read_entries(File.expand_path('resource.en',
File.dirname(__FILE__)))
end
+
file = File.expand_path('tkoptdb.rb', File.dirname(__FILE__))
ip = MultiTkIp.new_safeTk{
@@ -50,12 +51,11 @@ print "ip.eval_proc{}, which includes insecure operiation in the given block, re
print "If a proc object is given, the proc is evaluated on the safe-level which is kept on the proc :: ip.eval_proc( proc{$SAFE} ) ==> ", ip.eval_proc(proc{$SAFE}), "\n"
safe0_cmd = Proc.new{
+ print 'safe0_cmd safe-level == ', $SAFE, "\n"
# This proc object keeps current safe-level ($SAFE==0).
load file
}
-ip.eval_proc(safe0_cmd)
-
+ip.eval_proc{safe0_cmd.call}
# Tk.mainloop is ignored on the slave-IP
-
Tk.mainloop