Actions
Backport #5733
closedError when loading a converter
Status:
Closed
Assignee:
Description
I think this might be a bug, but I'm not sure. The following code
raises an exception:
# encoding:utf-8
require 'minitest/autorun'
class NewConverterTest < MiniTest::Unit::TestCase
def setup
@old_internal = Encoding.default_internal
@old_external = Encoding.default_external
end
def teardown
Encoding.default_internal = @old_internal
Encoding.default_external = @old_external
end
def test_iso_8859_utf_8_change_encodings
Encoding.default_internal = 'UTF-8'
Encoding.default_external = 'ISO-8859-1'
Encoding::Converter.new 'ISO-8859-1', 'UTF-8' # boom!
end
end
Exception:
1) Error:
test_iso_8859_utf_8_change_encodings(NewConverterTest):
Encoding::ConverterNotFoundError: code converter not found (ISO-8859-1 to UTF-8)
test.rb:21:in `initialize'
test.rb:21:in `new'
test.rb:21:in `test_iso_8859_utf_8_change_encodings'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:976:in `run'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:814:in `block in _run_suite'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:807:in `map'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:807:in `_run_suite'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:797:in `block in _run_suites'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:797:in `map'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:797:in `_run_suites'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:773:in `_run_anything'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:936:in `run_tests'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:923:in `block in _run'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:922:in `each'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:922:in `_run'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:911:in `run'
/Users/aaron/.local/lib/ruby/1.9.1/minitest/unit.rb:691:in `block in autorun'
Is this intentional? If so, why? Thank you.
--
Aaron Patterson
http://tenderlovemaking.com/
Files
Updated by naruse (Yui NARUSE) about 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33991.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- file.c (file_path_convert): don't convert it when the path string is
ascii only. [ruby-core:41556] [Bug #5733]
tests are contributed by nobu.
Updated by ktsj (Kazuki Tsujimoto) over 12 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport193
- Status changed from Closed to Assigned
- Assignee set to naruse (Yui NARUSE)
Could you backport it for 1.9.3?
Updated by naruse (Yui NARUSE) over 12 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r36735.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 33991:
* file.c (file_path_convert): don't convert it when the path string is
ascii only. [ruby-core:41556] [Bug #5733]
tests are contributed by nobu.
Actions
Like0
Like0Like0Like0