The fourth argument of JRuby's UDPSocket#send has to be Integer, but CRuby's
can be either String or Integer.
-------------------------------------------------------------------------------------------------------------
Key: JRUBY-4630
URL: http://jira.codehaus.org/browse/JRUBY-4630
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4
Environment: Windows XP
P4 2.4 Ghz
JRuby 1.4.0
SNMP gem v1.0.2
Reporter: nao16t
Priority: Minor
Fix For: JRuby 1.5
The fourth argument of JRuby's UDPSocket#send has to be Integer, but CRuby's
can be either String or Integer.
This was found by investigating JRUBY-4627 problem.
-------------------------------------------------------------------------------------------
C:>irb
irb(main):001:0> require 'socket'
=> true
irb(main):002:0> s = UDPSocket.new
=> #<UDPSocket:0x2c4e440>
irb(main):003:0> s.send('hello', 0, '192.168.1.17', '162')
=> 5
irb(main):004:0> s.recv(6)
Errno::ECONNRESET:
既存の接続はリモート
ホストに強制的に切断されました。
- recvf
rom(2)
from (irb):4:in `recv'
from (irb):4
irb(main):005:0>
C:\>jirb
irb(main):001:0> require 'socket'
=> true
irb(main):002:0> s = UDPSocket.new
=> #<UDPSocket:0xf2225f>
irb(main):003:0> s.send('hello', 0, '192.168.1.17', '162')
TypeError: can't convert String into Integer
from (irb):4
irb(main):004:0> s.send('hello', 0, '192.168.1.17', 162)
=> 5
irb(main):005:0> s.recv(6)
---------------------------------------------------------------------------------------------
--
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