From: Tanaka Akira Date: 2009-02-07T02:52:10+09:00 Subject: [ruby-dev:37935] test_imaps_post_connection_check test failure ふと OpenBSD で試してみたところ、 test_imaps_post_connection_check が失敗します。 % uname -a OpenBSD openbsd.tky.aist.go.jp 4.4 GENERIC#1562 amd64 % ./ruby -v test/net/imap/test_imap.rb -n test_imaps_post_connection_check ruby 1.9.2dev (2009-02-07 trunk 22101) [x86_64-openbsd4.4] /home/akr/ruby/o0/lib/ruby/1.9.1/x86_64-openbsd4.4/openssl.so: warning: loading in progress, circular require considered harmful - /home/akr/ruby/o0/lib/ruby/1.9.1/openssl.rb /home/akr/ruby/o0/lib/ruby/1.9.1/openssl.rb:22: warning: loading in progress, circular require considered harmful - /home/akr/ruby/o0/lib/ruby/1.9.1/openssl/ssl.rb /home/akr/ruby/o0/lib/ruby/1.9.1/openssl/x509.rb:17: warning: loading in progress, circular require considered harmful - /home/akr/ruby/o0/lib/ruby/1.9.1/openssl.rb Loaded suite test/net/imap/test_imap Started F Finished in 0.004250 seconds. 1) Failure: test_imaps_post_connection_check(IMAPTest) [test/net/imap/test_imap.rb:59]: [OpenSSL::SSL::SSLError] exception expected, not Class: Message: <"Invalid argument - connect(2)"> ---Backtrace--- test/net/imap/test_imap.rb:61:in `new' test/net/imap/test_imap.rb:61:in `block (2 levels) in test_imaps_post_connection_check' test/net/imap/test_imap.rb:145:in `imaps_test' test/net/imap/test_imap.rb:60:in `block in test_imaps_post_connection_check' test/net/imap/test_imap.rb:59:in `test_imaps_post_connection_check' --------------- 1 tests, 1 assertions, 1 failures, 0 errors, 0 skips 調べてみると、imaps_test で server = TCPServer.new(0) とやって作る TCP サーバが IPv6 専用になっているのに、 test_imaps_post_connection_check 内で Net::IMAP.new("127.0.0.1", :port => port, :ssl => { :ca_file => CA_FILE }) と IPv4 な 127.0.0.1 を指定して接続しようとしているからのよ うです。 -- [田中 哲][たなか あきら][Tanaka Akira]