UDPSocket#bind needs explicit conversion of Socket::INADDR_ANY to string
------------------------------------------------------------------------
Key: JRUBY-3569
URL: http://jira.codehaus.org/browse/JRUBY-3569
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.2
Environment: Linux devel-o8 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45
UTC 2009 i686 GNU/Linux
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java]
Reporter: Matthijs Bomhoff
Priority: Minor
The following script throws an exception on jruby 1.2 :
require 'socket'
sock = UDPSocket.open
sock.bind(Socket::INADDR_ANY, 0)
It works fine in ruby1.8 or ruby1.9. In order to get it to work on jruby, we
have to change it to the following (note the additional ".to_s") :
require 'socket'
sock = UDPSocket.open
sock.bind(Socket::INADDR_ANY.to_s, 0)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email