I was not interested in adding IPv6 support to my application, only in binding a port with a fallback mechanism. I worked around the problem with bind('0.0.0.0', 10001). But I still think that it is wrong that TCPServer.new implements...lucas (Lucas Nussbaum)
Indeed, bindv6only=1 seems to change this. However, bindv6only=1 is kind-of the default on all systems (except some Linux distros). My goal was to implement the following: try to bind port 10001 ; if already taken, bind port 10002 T...lucas (Lucas Nussbaum)
I built Ruby 2.2 from source, and still encountered the same problem as the original report, with the exception that the bogus error message seems fixed: $ ./ruby -vrsocket -e 'p TCPServer::new(10001); system("netstat -ln|grep 10001");...lucas (Lucas Nussbaum)
It might be fixed in Ruby 2.2... I don't have an easy way to test. Akira, do you have an easy way to test with Ruby 2.1? If it is indeed fixed, it might be worth backporting to 2.1.lucas (Lucas Nussbaum)
Also, a colleague using Arch Linux checked (using the same Ruby version). He doesn't have IPv6 enabled. And he also got the "TypeError: no implicit conversion of nil into String" exception instead of the Errno::EADDRINUSE one.lucas (Lucas Nussbaum)
that was from the Debian package indeed. I haven't rebuilt Ruby from source. The Debian package does not carry any Debian-specific patch at the moment. You cannot reproduce it?lucas (Lucas Nussbaum)
after: irb(main):003:0> TCPServer::new(10001) => #<TCPServer:fd 9> I get irb listening to port 10001 using IPv4, but not IPv6: tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 1000 376068 24437/irb a se...lucas (Lucas Nussbaum)
Dear Ruby developers, Could you follow up on this issue? The fix that was commited is not correct, as explained in comment #19. A correct fix is in comment #20. Also, could you backport this to the ruby1_9_3 branch?lucas (Lucas Nussbaum)
On 25/10/11 at 22:43 +0900, Yusuke Endoh wrote: > Hello, > > 2011/10/25 Lucas Nussbaum <[email protected]>: > > Instead, I would prefer a plan where the interpreter no longer releases with the stdlib, but just releases w...lucas (Lucas Nussbaum)