зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
380ea10dfa
Коммит
a8c748d277
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
line = ''
|
||||
indent = 0
|
||||
$stdout.sync = TRUE
|
||||
$stdout.sync = true
|
||||
print "ruby> "
|
||||
loop do
|
||||
l = gets
|
||||
|
|
|
@ -26,7 +26,7 @@ class String
|
|||
end
|
||||
|
||||
if ARGV[0] == '-w'
|
||||
wait = TRUE
|
||||
wait = true
|
||||
ARGV.shift
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,7 +3,7 @@ en = "\033[m"
|
|||
#st = "<<"
|
||||
#en = ">>"
|
||||
|
||||
while TRUE
|
||||
while true
|
||||
print "str> "
|
||||
STDOUT.flush
|
||||
input = gets
|
||||
|
|
Загрузка…
Ссылка в новой задаче