Bug #4618

Encoding::ConverterNotFoundErrors on trunk (Windows mingw)

Added by Jon Forums almost 3 years ago. Updated almost 3 years ago.

[ruby-core:35913]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:core
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-04-27 trunk 31364) [i386-mingw32] Backport:

Description

=begin
It appears recent newline trunk code changes cause test failures on Windows as I can't replicate the following failures in test_literal.rb, psych, or openssl on my Arch system.

For the openssl failures, I'm checking whether my recent upgrade from 0.9.8q to 0.9.8r changes things and will report back if needed.

Tested on Windows 7 Ultimate 32-bit with a trunk@31364 built using the RubyInstaller recipes and tdm-gcc 4.5.2.

$ make test
...
#339 testliteral.rb: echo foo #=> "foo\r\n" (expected "foo\n")
#340 test
literal.rb: s = "foo"; echo #{s} #=> "foo\r\n" (expected "foo\n")
FAIL 2/934 tests failed
make: *** [yes-btest-ruby] Error 1

$ make test-all TESTS=psych

1) Error:
testdumpfile(TestPsych):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/projects/rubyinstaller-git/sandbox/ruby19build/.ext/common/psych/visitors/emitter.rb:20:in end_document'
c:/projects/rubyinstaller-git/sandbox/ruby19_build/.ext/common/psych/visitors/emitter.rb:20:in
visit
PsychNodesDocument'
c:/projects/rubyinstaller-git/sandbox/ruby19build/.ext/common/psych/visitors/visitor.rb:15:in visit'
c:/projects/rubyinstaller-git/sandbox/ruby19_build/.ext/common/psych/visitors/visitor.rb:5:in
accept'
c:/projects/rubyinstaller-git/sandbox/ruby19
build/.ext/common/psych/visitors/emitter.rb:13:in block in visit_Psych_Nodes_Stream'
c:/projects/rubyinstaller-git/sandbox/ruby19_build/.ext/common/psych/visitors/emitter.rb:13:in
each'
c:/projects/rubyinstaller-git/sandbox/ruby19build/.ext/common/psych/visitors/emitter.rb:13:in visit_Psych_Nodes_Stream'
c:/projects/rubyinstaller-git/sandbox/ruby19_build/.ext/common/psych/visitors/visitor.rb:15:in
visit'
c:/projects/rubyinstaller-git/sandbox/ruby19
build/.ext/common/psych/visitors/visitor.rb:5:in accept'
c:/projects/rubyinstaller-git/sandbox/ruby19_build/.ext/common/psych/nodes/node.rb:46:in
toyaml'
c:/projects/rubyinstaller-git/sandbox/ruby19
build/.ext/common/psych.rb:190:in dump'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_psych.rb:68:in
block in testdumpfile'

398 tests, 1112 assertions, 0 failures, 1 errors, 0 skips

$ make test-all TESTS=openssl
...
1) Error:
testaddvalue(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

2) Error:
testaref(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

3) Error:
testaset(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

4) Error:
testclone(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

5) Error:
testconstants(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

6) Error:
testdup(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

7) Error:
testeach(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

8) Error:
testfreeze(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

9) Error:
testgetvalue(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

10) Error:
testgetvalueENV(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

11) Error:
testinitialize(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

12) Error:
testinitializewithemptyfile(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

13) Error:
testinitializewithexamplefile(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

14) Error:
testinspect(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

15) Error:
testsload(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

16) Error:
testsparse(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

17) Error:
testsparseformat(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

18) Error:
testsection(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

19) Error:
testsections(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

20) Error:
testtos(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'

21) Error:
testvalue(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universal
newline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test
config.rb:13:in `setup'

22) Error:
testvalueENV(OpenSSL::TestConfig):
Encoding::ConverterNotFoundError: code converter not found (universalnewline,crlfnewline)
c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/test_config.rb:13:in `setup'
=end


Related issues

Duplicated by ruby-trunk - Bug #4619: io.c is broken on Windows Closed 04/27/2011

Associated revisions

Revision 31377
Added by Nobuyoshi Nakada almost 3 years ago

  • io.c (make_writeconv): do not add textmode newline decorator if any newline decorator is set already. fixes #4618, fixes #4619

History

#1 Updated by Usaku NAKAMURA almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Nobuyoshi Nakada

=begin

=end

#2 Updated by Nobuyoshi Nakada almost 3 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r31377.
Jon, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • io.c (make_writeconv): do not add textmode newline decorator if any newline decorator is set already. fixes #4618, fixes #4619 =end

#3 Updated by Jon Forums almost 3 years ago

Thank you Nobu.

All looks good on Win7 32-bit using tdm-gcc 4.5.2 and upgraded to OpenSSL 1.0.0d:

sh-3.1$ ruby --version
ruby 1.9.3dev (2011-05-03 trunk 31412) [i386-mingw32]
sh-3.1$ make test-all TESTS='openssl psych'
...

Running tests:

..........................................................................................
.....................S....................................................................
..........................................................................................
..........................................................................................
..........................................................................................
..........................................................................................
.....

Finished tests in 8.856506s, 61.5367 tests/s, 288.2627 assertions/s.

1) Skipped:
testnotstartedsession(OpenSSL::TestSSL) [c:/Users/Jon/Documents/RubyDev/ruby-git/test/openssl/testssl.rb:158]:
non socket argument of SSLSocket.new is not supported on this platform

545 tests, 2553 assertions, 0 failures, 0 errors, 1 skips

Also available in: Atom PDF