Load rubygems before changing Encoding.default_internal (fixes #1914)
git-svn-id: file:///home/svn/framework3/trunk@9359 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
d90656be0e
commit
8b9eb25664
|
@ -29,6 +29,11 @@ if (RUBY_VERSION =~ /^1\.9\.0/)
|
|||
end
|
||||
|
||||
if(RUBY_VERSION =~ /^1\.9\./)
|
||||
# Load rubygems before changing default_internal, otherwise we may get
|
||||
# Encoding::UndefinedConversionError as the gemspec files are loaded
|
||||
require 'rubygems'
|
||||
Gem::Version # trigger Rubygems to fully load
|
||||
|
||||
# Force binary encoding for Ruby versions that support it
|
||||
if(Object.const_defined?('Encoding') and Encoding.respond_to?('default_external='))
|
||||
Encoding.default_external = Encoding.default_internal = "binary"
|
||||
|
|
Loading…
Reference in New Issue