summaryrefslogtreecommitdiff
path: root/sample/svr.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-19 20:26:16 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-19 20:26:16 +0000
commitd46e835344bc4d43c804d7b2d66145b80ef0c7e3 (patch)
tree7482b5a88aed2c13d2f2e45cf8679fc4a1ec9484 /sample/svr.rb
parentc3cd615aa4a2e52d8943df72a9a55d2607792fe9 (diff)
Strive to give better examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/svr.rb')
-rw-r--r--sample/svr.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/svr.rb b/sample/svr.rb
index af56605..6169861 100644
--- a/sample/svr.rb
+++ b/sample/svr.rb
@@ -9,7 +9,7 @@ addr.shift
printf("server is on %s\n", addr.join(":"))
socks = [gs]
-while TRUE
+loop do
nsock = select(socks);
next if nsock == nil
for s in nsock[0]
@@ -23,7 +23,7 @@ while TRUE
s.close
socks.delete(s)
else
- if str = s.gets;
+ if str = s.gets
s.write(str)
end
end