Commit 425a5c16 authored by Fabio Pelosin's avatar Fabio Pelosin

[rbx] Attempt to fix encoding issues.

parent a340ea29
...@@ -20,3 +20,4 @@ spec/fixtures/mercurial-repo/.hg/*cache ...@@ -20,3 +20,4 @@ spec/fixtures/mercurial-repo/.hg/*cache
spec/fixtures/vcr spec/fixtures/vcr
.yardoc .yardoc
/doc /doc
.rbx/
...@@ -153,7 +153,10 @@ module Pod ...@@ -153,7 +153,10 @@ module Pod
def self.from_file(path) def self.from_file(path)
podfile = Podfile.new do podfile = Podfile.new do
eval(File.open(path, 'r:utf-8') { |f| f.read }, nil, path.to_s) # TODO: work around for Rubinius incomplete encoding in 1.9 mode
string = File.open(path, 'r') { |f| f.read }
string.encode!('UTF-8') if string.respond_to?(:encode!)
eval(string, nil, path.to_s)
end end
podfile.defined_in_file = path podfile.defined_in_file = path
podfile.validate! podfile.validate!
......
...@@ -4,7 +4,10 @@ module Pod ...@@ -4,7 +4,10 @@ module Pod
extend Config::Mixin extend Config::Mixin
def self._eval_podspec(path) def self._eval_podspec(path)
eval(File.open(path, 'r:utf-8') { |f| f.read }, nil, path.to_s) # TODO: work around for Rubinius incomplete encoding in 1.9 mode
string = File.open(path, 'r') { |f| f.read }
string.encode!('UTF-8') if string.respond_to?(:encode!)
eval(string, nil, path.to_s)
end end
class Specification class Specification
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment