diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-02-23 15:20:04 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-02-23 15:20:04 -0600 |
commit | 45136c90c3be96107c6a350cff22072cf318bba9 (patch) | |
tree | 0e3116264103d567d16dfcb3a7437655989183a0 /lib | |
parent | 4b2f5dd731a522d3bb0ecbac80e7faffb98e158e (diff) | |
download | bundler-45136c90c3be96107c6a350cff22072cf318bba9.tar.gz |
[Exec] Fix loading on 1.8.7
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/exec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb index 4f304975..865ac202 100644 --- a/lib/bundler/cli/exec.rb +++ b/lib/bundler/cli/exec.rb @@ -75,7 +75,7 @@ module Bundler "#!/usr/bin/env ruby\n", "#!#{Gem.ruby}\n", ] - first_line = File.read(file, possibilities.map(&:size).max, :mode => "rb") + first_line = File.open(file, "rb") {|f| f.read(possibilities.map(&:size).max) } possibilities.any? {|shebang| first_line.start_with?(shebang) } end end |