3
0
Fork 0
forked from mirrors/nixpkgs

buildRubyGem: fixes gemspec UTF-8 loading issue

If a gemspec has UTF-8 characters in it, ruby will fail loading it with

    invalid multibyte char (US-ASCII)

This change forces the encoding to be correct, we assume everyone now
uses UTF-8.
This commit is contained in:
zimbatm 2016-09-06 14:42:58 +01:00
parent 288cf9fa2a
commit 62df82efcf

View file

@ -6,6 +6,11 @@ require 'fileutils'
require 'pathname'
require 'tmpdir'
if defined?(Encoding.default_internal)
Encoding.default_internal = Encoding::UTF_8
Encoding.default_external = Encoding::UTF_8
end
# Options:
#
# name - the gem name