[#30679] IO.popen doesn't fail for non-existent command — nobu@...
なかだです。
4 messages
2007/04/03
[#30681] IO.popen("-") with no fork — Nobuyoshi Nakada <nobu@...>
なかだです。
13 messages
2007/04/03
[#30685] Re: IO.popen("-") with no fork
— "U.Nakamura" <usa@...>
2007/04/04
こんにちは、なかむら(う)です。
[#30686] Re: IO.popen("-") with no fork
— Yukihiro Matsumoto <matz@...>
2007/04/04
Hi,
[#30687] Re: IO.popen("-") with no fork
— Nobuyoshi Nakada <nobu@...>
2007/04/04
なかだです。
[#30688] Re: IO.popen("-") with no fork
— Yukihiro Matsumoto <matz@...>
2007/04/04
まつもと ゆきひろです
[#30722] JSON ライブラリの取り込み — "NARUSE, Yui" <naruse@...>
naruseです。
20 messages
2007/04/21
[#30723] Re: JSON ライブラリの取り込み
— "Akinori MUSHA" <knu@...>
2007/04/21
At Sat, 21 Apr 2007 12:27:47 +0900,
[#30724] Re: JSON ライブラリの取り込み
— "NAKAMURA, Hiroshi" <nakahiro@...>
2007/04/21
-----BEGIN PGP SIGNED MESSAGE-----
[#30729] Re: Ruby 1.9: multiple splats on rvalues in parallel assignment — SASADA Koichi <ko1@...>
ささだです.
6 messages
2007/04/26
[#30730] Re: Ruby 1.9: multiple splats on rvalues in parallel assignment
— Yukihiro Matsumoto <matz@...>
2007/04/26
まつもと ゆきひろです
[ruby-dev:30713] sampleのTRUEとFALSEをtrueとfalseに
From:
Kazuhiro NISHIYAMA <zn@...>
Date:
2007-04-16 11:11:11 UTC
List:
ruby-dev #30713
西山和広です。 http://jp.rubyist.net/magazine/?0013-CodeReview#l12 のときにsample以下に残っていると思っていたのをるびま本で また読んだら思い出したので、パッチを書いてみました。 branches/ruby_1_8用です。 -- |ZnZ(ゼット エヌ ゼット) |西山和広(Kazuhiro NISHIYAMA)
Attachments (1)
sample.diff
(1.94 KB, text/x-diff)
Index: sample/dualstack-httpd.rb
===================================================================
--- sample/dualstack-httpd.rb (revision 12182)
+++ sample/dualstack-httpd.rb (working copy)
@@ -26,7 +26,7 @@
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"
Index: sample/from.rb
===================================================================
--- sample/from.rb (revision 12182)
+++ sample/from.rb (working copy)
@@ -26,7 +26,7 @@
end
if ARGV[0] == '-w'
- wait = TRUE
+ wait = true
ARGV.shift
end
Index: sample/regx.rb
===================================================================
--- sample/regx.rb (revision 12182)
+++ sample/regx.rb (working copy)
@@ -3,7 +3,7 @@
#st = "<<"
#en = ">>"
-while TRUE
+while true
print "str> "
STDOUT.flush
input = gets
Index: sample/cbreak.rb
===================================================================
--- sample/cbreak.rb (revision 12182)
+++ sample/cbreak.rb (working copy)
@@ -6,11 +6,11 @@
TIOCSETP = 0x80067409
def cbreak ()
- set_cbreak(TRUE)
+ set_cbreak(true)
end
def cooked ()
- set_cbreak(FALSE)
+ set_cbreak(false)
end
def set_cbreak (on)
Index: sample/eval.rb
===================================================================
--- sample/eval.rb (revision 12182)
+++ sample/eval.rb (working copy)
@@ -1,6 +1,6 @@
line = ''
indent = 0
-$stdout.sync = TRUE
+$stdout.sync = true
print "ruby> "
loop do
l = gets
Index: sample/philos.rb
===================================================================
--- sample/philos.rb (revision 12182)
+++ sample/philos.rb (working copy)
@@ -25,7 +25,7 @@
end
def philosopher(n)
- while TRUE
+ while true
think n
$forks[n].lock
if not $forks[(n+1)%N].try_lock