summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:51:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:51:51 +0000
commit67e61153d335aecc6e1551f754a887bc294b3fa8 (patch)
tree2375bfc58b5bfbc82fb0b518cc01040951f019f6 /sample
parent5c1b68e95a84f227116f210b78a673e3e63dd174 (diff)
* sample: replace TRUE, FALSE with true, false respectively.
a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>. [ruby-dev:30713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/cbreak.rb4
-rw-r--r--sample/dualstack-httpd.rb2
-rw-r--r--sample/eval.rb2
-rw-r--r--sample/from.rb2
-rw-r--r--sample/philos.rb2
-rw-r--r--sample/regx.rb2
6 files changed, 7 insertions, 7 deletions
diff --git a/sample/cbreak.rb b/sample/cbreak.rb
index cbb15d2f41..76b534a76a 100644
--- a/sample/cbreak.rb
+++ b/sample/cbreak.rb
@@ -6,11 +6,11 @@ TIOCGETP = 0x40067408
TIOCSETP = 0x80067409
def cbreak ()
- set_cbreak(TRUE)
+ set_cbreak(true)
end
def cooked ()
- set_cbreak(FALSE)
+ set_cbreak(false)
end
def set_cbreak (on)
diff --git a/sample/dualstack-httpd.rb b/sample/dualstack-httpd.rb
index 893b29feba..69e3181863 100644
--- a/sample/dualstack-httpd.rb
+++ b/sample/dualstack-httpd.rb
@@ -26,7 +26,7 @@ end
ls = mysock # copy to dynamic variable
t = Thread.current
STDERR.print "socket #{myname} listener started, pid #{$$} thread #{t}\n"
- while TRUE
+ while true
as = ls.accept
Thread.start do
STDERR.print "socket #{myname} accepted, thread ", Thread.current, "\n"
diff --git a/sample/eval.rb b/sample/eval.rb
index 90b839e873..ed4b7c3de5 100644
--- a/sample/eval.rb
+++ b/sample/eval.rb
@@ -1,6 +1,6 @@
line = ''
indent = 0
-$stdout.sync = TRUE
+$stdout.sync = true
print "ruby> "
loop do
l = gets
diff --git a/sample/from.rb b/sample/from.rb
index 59cc387792..6b0c702bb7 100644
--- a/sample/from.rb
+++ b/sample/from.rb
@@ -26,7 +26,7 @@ class String
end
if ARGV[0] == '-w'
- wait = TRUE
+ wait = true
ARGV.shift
end
diff --git a/sample/philos.rb b/sample/philos.rb
index 119e7c36b9..5c8f43c819 100644
--- a/sample/philos.rb
+++ b/sample/philos.rb
@@ -25,7 +25,7 @@ def eat(n)
end
def philosopher(n)
- while TRUE
+ while true
think n
$forks[n].lock
if not $forks[(n+1)%N].try_lock
diff --git a/sample/regx.rb b/sample/regx.rb
index aaf4b5f1ee..6d90b7f293 100644
--- a/sample/regx.rb
+++ b/sample/regx.rb
@@ -3,7 +3,7 @@ en = "\033[m"
#st = "<<"
#en = ">>"
-while TRUE
+while true
print "str> "
STDOUT.flush
input = gets