TCPSocket#closewrite has no effect
----------------------------------
Key: JRUBY-1459
URL: http://jira.codehaus.org/browse/JRUBY-1459
Project: JRuby
Issue Type: Bug
Reporter: Evan Weaver
Assignee: Thomas E Enebo
Not sure if Java doesn't support any half-duplex operations, but
TCPSocket#close_write doesn't do anything.
{{
require 'socket'
socket = TCPSocket.new('127.0.0.1', '3000')
socket.write("G")
socket.close_write
socket.write("E")
}}
MRI:
{{
chloe:~/p/mongrel eweaver$ ruby test/jruby_socket.rb
test/jruby_socket.rb:8:in `write': not opened for writing (IOError)
from test/jruby_socket.rb:8
}}
JRuby:
{{
chloe:~/p/mongrel eweaver$ jruby test/jruby_socket.rb
chloe:~/p/mongrel eweaver$
}}
Also note that #close_write returns 'nil' on MRI, but 'self' on JRuby. It
inherits from RubyIO.java:
{{
@JRubyMethod(name = "close_write")
public IRubyObject close_write() {
return this;
}
}}
--
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