summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:53:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:53:09 +0000
commita8c748d2773b6ce5d871360ee36f7d214ae1af11 (patch)
tree22a03c9fad82514629b36e146db6577fd969e512 /sample
parent380ea10dfaf431ab14b92edb7154ccd4cacd159f (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/trunk@12184 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 cbb15d2f419..76b534a76a1 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 893b29febaa..69e31818637 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 90b839e8735..ed4b7c3de50 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 59cc3877926..6b0c702bb72 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 119e7c36b93..5c8f43c8198 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 aaf4b5f1ee8..6d90b7f293b 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