diff options
author | zimbatm <zimbatm@zimbatm.com> | 2016-09-06 14:42:58 +0100 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2016-09-06 14:42:58 +0100 |
commit | 62df82efcf7b01e056471cadd8e27ce4c2cec5d0 (patch) | |
tree | 28daec7dca2a8af09b798dd0f5d62a56a430b733 /pkgs/development/ruby-modules/gem | |
parent | 288cf9fa2add18a5f1d91643dc4cccaa55c0f8ee (diff) |
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.
Diffstat (limited to 'pkgs/development/ruby-modules/gem')
-rw-r--r-- | pkgs/development/ruby-modules/gem/nix-bundle-install.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/ruby-modules/gem/nix-bundle-install.rb b/pkgs/development/ruby-modules/gem/nix-bundle-install.rb index 48ab5270c22f6..8eac766554e1d 100644 --- a/pkgs/development/ruby-modules/gem/nix-bundle-install.rb +++ b/pkgs/development/ruby-modules/gem/nix-bundle-install.rb @@ -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 |