Actions
Bug #3758
closedrequire Raises Encoding::CompatibilityError for Invalid, Non-ASCII Feature Names
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-08-28 trunk 29127) [i686-linux]
Backport:
Description
=begin
When trying to require a feature with a non-ASCII name that does not correspond to an installed gem or a file in $LOAD_PATH, this happens:
run@paint:~/git/ruby → ./ruby -e 'require "∞"'
internal:lib/rubygems/custom_require:33:in end_with?': incompatible character encodings: ASCII- 8BIT and UTF-8 (Encoding::CompatibilityError) from <internal:lib/rubygems/custom_require>:33:in
rescue in require'
from internal:lib/rubygems/custom_require:29:in require' from -e:1:in
'
The attached is a simplistic fix, but it assumes both encodings are ASCII-compatible; the elegant solution evades me.
=end
Files
Actions
Like0
Like0