summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog6
-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
7 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f70aa3f28..9ab73ae5f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 16 22:51:11 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * sample: replace TRUE, FALSE with true, false respectively.
+ a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>.
+ [ruby-dev:30713]
+
Mon Apr 16 17:08:02 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb (make_switch): do not clobber converter if pattern
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