|
|
Choosing A Webhost: |
[ruby-dev:28861] test_accept_nonblock(TestNonblockSocket) and test_connect_: msg#00185lang.ruby.devel
(ArgumentError で止まっているので boron の chkbuild には出て きていませんが) 以下のような失敗が起きています。 % ./ruby -v ruby 1.9.0 (2006-06-25) [i686-linux] % ./ruby test/runner.rb test/socket/test_nonblock.rb Loaded suite test_nonblock.rb Started FF..... Finished in 0.020617 seconds. 1) Failure: test_accept_nonblock(TestNonblockSocket) [/tmp/19/ruby/test/socket/test_nonblock.rb:18]: <"\002\000\2254\177\000\000\001\000\000\000\000\000\000\000\000"> expected but was <"\002\000\000\000\177\000\000\001\200\330\347\267\034\000\000\000X\263\317\277\000\000\000...\277\001\000\000\000">. 2) Failure: test_connect_nonblock(TestNonblockSocket) [/tmp/19/ruby/test/socket/test_nonblock.rb:43]: <"\002\000\273\205\177\000\000\001\000\000\000\000\000\000\000\000"> expected but was <"\000\000\000\000\004\000\000\000@\277\312\267\377\377\377\377\024\265\317\277\000\000\000...\347\267@\000\000\000">. 7 tests, 29 assertions, 2 failures, 0 errors 以前は問題なかったはずだ、と思って調べてみると、件の大きなコ ミットの socket.c の変更 http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/socket/socket.c.diff?r1=1.170;r2=1.171 の中の以下の変更のようです。 @@ -2948,18 +2824,15 @@ sock_recvfrom_nonblock(int argc, VALUE * } static VALUE -sock_accept(sock) - VALUE sock; +sock_accept(VALUE sock) { OpenFile *fptr; - VALUE sock2; char buf[1024]; socklen_t len = sizeof buf; GetOpenFile(sock, fptr); - sock2 = s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)buf,&len); - - return rb_assoc_new(sock2, rb_str_new(buf, len)); + return rb_assoc_new(s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)buf, &len), + rb_str_new(buf, len)); } /* @@ -3011,17 +2884,16 @@ sock_accept(sock) * * Socket#accept */ static VALUE -sock_accept_nonblock(sock) - VALUE sock; +sock_accept_nonblock(VALUE sock) { OpenFile *fptr; - VALUE sock2; char buf[1024]; socklen_t len = sizeof buf; GetOpenFile(sock, fptr); - sock2 = s_accept_nonblock(rb_cSocket, fptr, (struct sockaddr *)buf, &len); - return rb_assoc_new(sock2, rb_str_new(buf, len)); + return rb_assoc_new(s_accept_nonblock(rb_cSocket, fptr, + (struct sockaddr *)buf, &len), + rb_str_new(buf, len)); } /* ISO にのりこんで C の引数の評価順序を左から右に決めさせる、 というんでなければ、これは revert が適当ではないかと思います。 -- [田中 哲][たなか あきら][Tanaka Akira]
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ruby-dev:28860] Re: test_return_trace_func(TestIterator): /tmp/19/lib/ruby/1.9/test/unit.rb:275: ArgumentError, Yukihiro Matsumoto |
|---|---|
| Next by Date: | [ruby-dev:28862] Re: test_accept_nonblock(TestNonblockSocket) and test_connect_nonblock(TestNonblockSocket) failure, Yukihiro Matsumoto |
| Previous by Thread: | [ruby-dev:28843] ripper core dump with arg_paren, Tanaka Akira |
| Next by Thread: | [ruby-dev:28862] Re: test_accept_nonblock(TestNonblockSocket) and test_connect_nonblock(TestNonblockSocket) failure, Yukihiro Matsumoto |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |