summaryrefslogtreecommitdiff
path: root/lib/bundler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r--lib/bundler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 6b62ac9b1c..5da316ec4d 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -424,7 +424,7 @@ EOF
def read_file(file)
SharedHelpers.filesystem_access(file, :read) do
- File.open(file, "rb", &:read)
+ File.open(file, "r:UTF-8", &:read)
end
end
@@ -445,7 +445,7 @@ EOF
def load_gemspec_uncached(file, validate = false)
path = Pathname.new(file)
- contents = File.open(file, "r:UTF-8", &:read)
+ contents = read_file(file)
spec = if contents.start_with?("---") # YAML header
eval_yaml_gemspec(path, contents)
else