Commit 6ee74e0c authored by Eloy Duran's avatar Eloy Duran

Explicitely read external source files (specs|Podfile) as utf-8.

parent 3bf1cfc3
...@@ -6,4 +6,4 @@ rvm: ...@@ -6,4 +6,4 @@ rvm:
#- rbx-18mode #- rbx-18mode
- rbx-19mode - rbx-19mode
install: NOEXEC=skip rake travis:setup install: NOEXEC=skip rake travis:setup
script: RUBYOPT=-Ku bundle exec rake spec script: bundle exec rake spec
Encoding.default_external = Encoding::UTF_8 if RUBY_VERSION > '1.8.7'
module Pod module Pod
VERSION = '0.6.0.rc2' VERSION = '0.6.0.rc2'
......
...@@ -153,7 +153,7 @@ module Pod ...@@ -153,7 +153,7 @@ module Pod
def self.from_file(path) def self.from_file(path)
podfile = Podfile.new do podfile = Podfile.new do
eval(path.read, nil, path.to_s) eval(File.open(path, 'r:utf-8') { |f| f.read }, nil, path.to_s)
end end
podfile.defined_in_file = path podfile.defined_in_file = path
podfile.validate! podfile.validate!
......
...@@ -4,7 +4,7 @@ module Pod ...@@ -4,7 +4,7 @@ module Pod
extend Config::Mixin extend Config::Mixin
def self._eval_podspec(path) def self._eval_podspec(path)
eval(path.read, nil, path.to_s) eval(File.open(path, 'r:utf-8') { |f| f.read }, 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