diff options
author | Yukihiro Matsumoto <[email protected]> | 1995-02-24 13:15:43 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-17 22:09:31 +0900 |
commit | 881c5a9c320c637ee0f6526b40cf70c1379ab656 (patch) | |
tree | 3c0327fc9bdef8f056563ceee400226ac572535b /sample/svr.rb | |
parent | 2f106ab85c4f4e171374aee261f5a12bdd923c41 (diff) |
version 0.68v0_68
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.67-0.68.diff.gz
Fri Feb 24 13:15:43 1995 Yukihiro Matsumoto (matz@ix-02)
* version 0.68
Thu Feb 23 11:19:19 1995 Yukihiro Matsumoto (matz@ix-02)
* eval.c: resque節のselfの値が間違っていた.
* eval.c(rb_clear_cache): キャッシュのクリアし忘れがあった.
* eval.c: 定数のスコープをクラス内の静的スコープに変更した.これに
よって,特異メソッドからは参照される定数は,レシーバのクラスでは
なく,定義されたスコープのクラスの定数となる.
Wed Feb 22 00:51:38 1995 Yukihiro Matsumoto (matz@dyna)
* regex.c: ignorecaseを正規表現のコンパイル前に指定しないと正しく
動作しない.修正.
* string.c(toupper,tolower): bug fix.
* ENV,VERSION: readonly変数から定数へ.
Diffstat (limited to 'sample/svr.rb')
-rw-r--r-- | sample/svr.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sample/svr.rb b/sample/svr.rb index 91faa56dd8..23b2bf71f6 100644 --- a/sample/svr.rb +++ b/sample/svr.rb @@ -2,7 +2,9 @@ # usage: ruby svr.rb gs = TCPserver.open(0) -printf("server port is on %d\n", gs.port) +addr = gs.addr +addr.shift +printf("server is on %d\n", addr.join(":")) socks = [gs] while TRUE @@ -10,7 +12,9 @@ while TRUE if nsock == nil; continue end for s in nsock[0] if s == gs - socks.push(s.accept) + ns = s.accept + socks.push(ns) + print(s, " is accepted\n") else if s.eof print(s, " is gone\n") |