IO#write_nonblock should always check whether the io is writable or not
-----------------------------------------------------------------------

                 Key: JRUBY-2280
                 URL: http://jira.codehaus.org/browse/JRUBY-2280
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1RC2
         Environment: Latest JRuby 1.1RC2
            Reporter: Vladimir Sizikov
            Assignee: Vladimir Sizikov
             Fix For: JRuby 1.1


MRI behavior for IO#write_nonblock: always check whether the IO is writable or 
not, even if we are to write just 0 bytes.

JRuby doesn't check that in case of writing 0 bytes.

This leads to one rubyspec failure:

{noformat}
IO#write_nonblock on a file checks if the file is writable if writing zero 
bytes FAILED
Expected Exception but no exception was raised
/opt/work/rubinius/./mspec/expectations.rb:10:in `fail_with'
/opt/work/rubinius/./mspec/expectations/should.rb:6:in `should'
/opt/work/rubinius/./spec/ruby/1.8/core/io/write_nonblock_spec.rb:33
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `call'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `protect'
/opt/work/rubinius/./mspec/runner/state.rb:46:in `each'
/opt/work/rubinius/./mspec/runner/state.rb:46:in `protect'
/opt/work/rubinius/./mspec/runner/state.rb:59:in `process'
/opt/work/rubinius/./mspec/runner/state.rb:55:in `each'
/opt/work/rubinius/./mspec/runner/state.rb:55:in `process'
/opt/work/rubinius/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rubinius/./mspec/runner/object.rb:11:in `describe'
/opt/work/rubinius/./spec/ruby/1.8/core/io/write_nonblock_spec.rb:5
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `load'
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `call'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `protect'
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:33:in `each'
/opt/work/rubinius/./mspec/runner/mspec.rb:33:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-ci:59
{noformat}

Fix is coming.

-- 
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


Reply via email to