Improve zlib compatibility with CRuby 1.8.7 -------------------------------------------
Key: JRUBY-4503 URL: http://jira.codehaus.org/browse/JRUBY-4503 Project: JRuby Issue Type: Improvement Components: Extensions Affects Versions: JRuby 1.4 Reporter: Hiroshi Nakamura Attachments: test_zlib.rb Attached test is for ruby 1.8.8.dev (I added it at ruby_1_8 branch in MRI repo). MRI 1.8.7 is 1E. (should be fixed in the next release; I'll push.) MRI trunk passes all tests except 1 encoding related test. Here's result of JRuby 1.4. {noformat} 0% /home/nahi/java/jruby-1.4.0/bin/jruby -v test/externals/ruby1.8/zlib/test_zlib.rb jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) Client VM 1.6.0_16) [i386-java] Loaded suite test/externals/ruby1.8/zlib/test_zlib Started .......F......F.E....E...FF.F.FF.FF.............F..F......F....F.E Finished in 7.554 seconds. 1) Failure: test_close(TestZlibDeflate) [test/externals/ruby1.8/zlib/test_zlib.rb:173]: <Zlib::Error> exception expected but none was thrown. 2) Failure: test_deflate_raise_after_finish(TestZlibDeflate) [test/externals/ruby1.8/zlib/test_zlib.rb:215]: <Zlib::StreamError> exception expected but none was thrown. 3) Error: test_dup(TestZlibDeflate): NotImplementedError: Zlib::Deflate#dup is not yet implemented test/externals/ruby1.8/zlib/test_zlib.rb:28:in `test_dup' 4) Error: test_reset(TestZlibDeflate): Zlib::DataError: invalid stored block lengths test/externals/ruby1.8/zlib/test_zlib.rb:162:in `inflate' test/externals/ruby1.8/zlib/test_zlib.rb:167:in `test_reset' 5) Failure: test_comment(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:359:in `test_comment' test/externals/ruby1.8/zlib/test_zlib.rb:355:in `open' test/externals/ruby1.8/zlib/test_zlib.rb:355:in `test_comment']: <Zlib::GzipFile::Error> exception expected but none was thrown. 6) Failure: test_crc(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:300]: <2356372769> expected but was <0>. 7) Failure: test_lineno(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:372]: <[0, "foo\n"]> expected but was <[1, "foo\n"]>. 8) Failure: test_orig_name(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:345:in `test_orig_name' test/externals/ruby1.8/zlib/test_zlib.rb:341:in `open' test/externals/ruby1.8/zlib/test_zlib.rb:341:in `test_orig_name']: <Zlib::GzipFile::Error> exception expected but none was thrown. 9) Failure: test_os_code(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:335]: <11> expected but was <255>. 10) Failure: test_pos(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:412:in `test_pos' test/externals/ruby1.8/zlib/test_zlib.rb:409:in `open' test/externals/ruby1.8/zlib/test_zlib.rb:409:in `test_pos']: <3> expected but was <nil>. 11) Failure: test_sync(TestZlibGzipFile) [test/externals/ruby1.8/zlib/test_zlib.rb:399]: <true> expected but was <nil>. 12) Failure: test_reader_wrap(TestZlibGzipReader) [test/externals/ruby1.8/zlib/test_zlib.rb:654]: <IOError> exception expected but was Class: <Errno::EBADF> Message: <"Bad file descriptor - Bad file descriptor"> ---Backtrace--- test/externals/ruby1.8/zlib/test_zlib.rb:654:in `test_reader_wrap' test/externals/ruby1.8/zlib/test_zlib.rb:654:in `test_reader_wrap' --------------- 13) Failure: test_rewind(TestZlibGzipReader) [test/externals/ruby1.8/zlib/test_zlib.rb:506]: <"foo"> expected but was <"">. 14) Failure: test_open(TestZlibGzipWriter) [test/externals/ruby1.8/zlib/test_zlib.rb:735]: <Zlib::StreamError> exception expected but none was thrown. 15) Failure: test_initialize(TestZlibInflate) [test/externals/ruby1.8/zlib/test_zlib.rb:229]: <Zlib::StreamError> exception expected but none was thrown. 16) Error: test_sync(TestZlibInflate): Zlib::DataError: unknown compression method test/externals/ruby1.8/zlib/test_zlib.rb:258:in `test_sync' 66 tests, 383 assertions, 13 failures, 3 errors 1% {noformat} And I'm working on patching (somewhat big) RubyZlib.java and ZlibDeflate.java. I'll post a patch in a day. -- 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