Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Unbreak gem specification loading if Encoding.default_internal = 'ISO-8859-1' #146

Closed
wants to merge 1 commit into
from
Commits on Jan 11, 2012
  1. Unbreak gem specification loading if specification file encoding is n…

    jeremyevans committed Aug 2, 2011
    …ot compatible with Encoding.default_internal
    
    The :encoding option only specifies the external encoding.  If
    Encoding.default_internal is set, it will automatically convert
    it to the internal encoding.  If it cannot be converted (e.g.
    internal encoding is US-ASCII and specification file contains
    8-bit characters), an error is raised.
    
    Instead, the :mode option should be given specifying that the
    file should be left in its external encoding without converting
    it to the default internal encoding.  This allows you to load
    gem specification files with 8-bit characters and a default
    internal encoding of US-ASCII.