mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
ext/tk: remove $SAFE 2..4 code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
61847a8279
commit
c97a6987b6
11 changed files with 18 additions and 83 deletions
3
ext/tk/sample/safe-tk.rb
Normal file → Executable file
3
ext/tk/sample/safe-tk.rb
Normal file → Executable file
|
@ -117,9 +117,6 @@ p ip.eval_str("
|
|||
:padx=>10, :pady=>7)
|
||||
", bind)
|
||||
|
||||
puts "\n---- change the safe slave IP's safe-level ==> 4 ----------"
|
||||
ip.safe_level = 4
|
||||
|
||||
puts "\n---- call 3rd and 4th eval_proc ----------"
|
||||
p ip.eval_proc{
|
||||
TkLabel.new(:text=>"3rd and 4th eval_proc : $SAFE == #{$SAFE}").pack
|
||||
|
|
2
ext/tk/sample/tkoptdb-safeTk.rb
Normal file → Executable file
2
ext/tk/sample/tkoptdb-safeTk.rb
Normal file → Executable file
|
@ -31,7 +31,7 @@ file = File.expand_path('tkoptdb.rb', File.dirname(__FILE__))
|
|||
|
||||
ip = MultiTkIp.new_safeTk{
|
||||
# When a block is given to 'new_safeTk' method,
|
||||
# the block is evaluated on $SAFE==4.
|
||||
# the block is evaluated on $SAFE==1.
|
||||
ent.each{|pat, val| Tk.tk_call('option', 'add', pat, val)}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue