diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-03 22:12:48 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-04 12:25:05 +0200 |
commit | 8805d984636dbcf7d33969744e68a5aba729898e (patch) | |
tree | 4cca8f718cb8f3f9169ebb003576876172933513 | |
parent | fb4f0a81768e6dfb5c2112f9d6f1d8e0b3096c8c (diff) | |
download | bundler-8805d984636dbcf7d33969744e68a5aba729898e.tar.gz |
Read gemspec binarily
When running `bin/rspec spec/runtime/setup_spec.rb -e symlink`, I get an
"invalid byte sequence in US-ASCII" error. This commit fixes that.
-rw-r--r-- | spec/runtime/setup_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index aa24c3a736..d1cc970ddf 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -819,7 +819,7 @@ end FileUtils.ln_s(bundler_dir, File.join(gems_dir, full_name)) gemspec_file = ruby_core? ? "#{bundler_dir}/lib/bundler/bundler.gemspec" : "#{bundler_dir}/bundler.gemspec" - gemspec = File.read(gemspec_file). + gemspec = File.binread(gemspec_file). sub("Bundler::VERSION", %("#{Bundler::VERSION}")) gemspec = gemspec.lines.reject {|line| line =~ %r{lib/bundler/version} }.join |