Permalink
Browse files

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

  • Loading branch information...
1 parent 3bf1cfc commit 6ee74e0cc060466114221cda3e18e0d5c342b24b @alloy alloy committed Jun 7, 2012
Showing with 3 additions and 5 deletions.
  1. +1 −1 .travis.yml
  2. +0 −2 lib/cocoapods.rb
  3. +1 −1 lib/cocoapods/podfile.rb
  4. +1 −1 lib/cocoapods/specification.rb
View
@@ -6,4 +6,4 @@ rvm:
#- rbx-18mode
- rbx-19mode
install: NOEXEC=skip rake travis:setup
-script: RUBYOPT=-Ku bundle exec rake spec
+script: bundle exec rake spec
View
@@ -1,5 +1,3 @@
-Encoding.default_external = Encoding::UTF_8 if RUBY_VERSION > '1.8.7'
-
module Pod
VERSION = '0.6.0.rc2'
View
@@ -153,7 +153,7 @@ def empty?
def self.from_file(path)
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
podfile.defined_in_file = path
podfile.validate!
@@ -4,7 +4,7 @@ module Pod
extend Config::Mixin
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
class Specification

0 comments on commit 6ee74e0

Please sign in to comment.