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

use true and false [ci skip]

* ext/tk/lib/tk/texttag.rb, ext/tk/sample/tcltklib/sample2.rb,
  ext/tk/sample/tkline.rb, ext/tk/sample/tktimer.rb: use true and
  false instead of TRUE and FALSE.

* ext/win32ole/sample/ienavi.rb (stop_msg_loop): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-08-09 01:42:48 +00:00
parent dfc9cb4005
commit 5a80f0c530
5 changed files with 14 additions and 14 deletions

View file

@ -175,7 +175,7 @@ class TkTextTag<TkObject
# end # end
# end # end
# def configure(key, value) # def configure(key, value)
# if value == FALSE # if value == false
# value = "0" # value = "0"
# elsif value.kind_of?(Proc) # elsif value.kind_of?(Proc)
# value = install_cmd(value) # value = install_cmd(value)

View file

@ -381,7 +381,7 @@ class Othello
$wm.e("iconname", $root, "Othello") $wm.e("iconname", $root, "Othello")
@board.com_disk = WHITE @board.com_disk = WHITE
@game_over = FALSE @game_over = false
TclTk.mainloop TclTk.mainloop
end end
@ -403,11 +403,11 @@ class Othello
@board_view.clear @board_view.clear
@board.reset @board.reset
$wm.e("title", $root, "Othello") $wm.e("title", $root, "Othello")
@game_over = FALSE @game_over = false
end end
def com_turn def com_turn
@in_com_turn = TRUE @in_com_turn = true
$update.e() $update.e()
sleep(0.5) sleep(0.5)
begin begin
@ -421,22 +421,22 @@ class Othello
else else
$wm.e("title", $root, "{Othello - You Loose!}") $wm.e("title", $root, "{Othello - You Loose!}")
end end
@game_over = TRUE @game_over = true
break break
elsif com_disk == 0 elsif com_disk == 0
$wm.e("title", $root, "{Othello - You Win!}") $wm.e("title", $root, "{Othello - You Win!}")
@game_over = TRUE @game_over = true
break break
elsif man_disk == 0 elsif man_disk == 0
$wm.e("title", $root, "{Othello - You Loose!}") $wm.e("title", $root, "{Othello - You Loose!}")
@game_over = TRUE @game_over = true
break break
end end
row, col = @board.search(@board.com_disk) row, col = @board.search(@board.com_disk)
break if row == nil || col == nil break if row == nil || col == nil
@board.put_disk(row, col, @board.com_disk) @board.put_disk(row, col, @board.com_disk)
end while @board.search(@board.man_disk) == [nil, nil] end while @board.search(@board.man_disk) == [nil, nil]
@in_com_turn = FALSE @in_com_turn = false
end end
def show_point def show_point

View file

@ -2,10 +2,10 @@
require "tkclass" require "tkclass"
$tkline_init = FALSE $tkline_init = false
def start_random def start_random
return if $tkline_init return if $tkline_init
$tkline_init = TRUE $tkline_init = true
if defined? Thread if defined? Thread
Thread.start do Thread.start do
loop do loop do

View file

@ -14,7 +14,7 @@ TkButton.new {
text 'Start' text 'Start'
command proc { command proc {
if $stopped if $stopped
$stopped = FALSE $stopped = false
tick tick
end end
} }
@ -24,14 +24,14 @@ TkButton.new {
text 'Stop' text 'Stop'
command proc{ command proc{
exit if $stopped exit if $stopped
$stopped = TRUE $stopped = true
} }
pack('side'=>'right','fill'=>'both','expand'=>'yes') pack('side'=>'right','fill'=>'both','expand'=>'yes')
} }
$seconds=0 $seconds=0
$hundredths=0 $hundredths=0
$stopped=TRUE $stopped=true
def tick def tick
if $stopped then return end if $stopped then return end

View file

@ -9,7 +9,7 @@ end
def stop_msg_loop def stop_msg_loop
puts "Now Stop IE..." puts "Now Stop IE..."
$LOOP = FALSE; $LOOP = false;
end end
def default_handler(event, *args) def default_handler(event, *args)