Project

General

Profile

Actions

Bug #3758

closed

require Raises Encoding::CompatibilityError for Invalid, Non-ASCII Feature Names

Added by runpaint (Run Paint Run Run) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-08-28 trunk 29127) [i686-linux]
Backport:
[ruby-core:31915]

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

custom-require.rb.patch (536 Bytes) custom-require.rb.patch runpaint (Run Paint Run Run), 08/29/2010 06:16 AM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

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

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

=end

Actions

Also available in: Atom PDF

Like0
Like0