summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
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