diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-04-07 11:16:45 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-04-07 12:03:15 -0500 |
commit | 7cb108d62bad5448a7e7b3b9c12717747ad41ca5 (patch) | |
tree | d6366cd33a44b8c12320c8a79071c8f0f438be38 | |
parent | ada8798a3f3eb380dc4c00f0f7d017d190693df2 (diff) | |
download | bundler-7cb108d62bad5448a7e7b3b9c12717747ad41ca5.tar.gz |
Fix require spec on Ruby < 2
-rw-r--r-- | spec/runtime/require_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb index 5bf0321f41..59d65bab24 100644 --- a/spec/runtime/require_spec.rb +++ b/spec/runtime/require_spec.rb @@ -370,7 +370,7 @@ RSpec.describe "Bundler.require" do run! <<-R path = File.join(Gem.dir, "specifications", "rack-1.0.0.gemspec") contents = File.read(path) - contents = contents.lines.insert(-2, "\n raise 'broken gemspec'\n").join + contents = contents.lines.to_a.insert(-2, "\n raise 'broken gemspec'\n").join File.open(path, "w") do |f| f.write contents end @@ -394,7 +394,7 @@ RSpec.describe "Bundler.require" do run! <<-R path = Gem.loaded_specs["foo"].loaded_from contents = File.read(path) - contents = contents.lines.insert(-2, "\n raise 'broken gemspec'\n").join + contents = contents.lines.to_a.insert(-2, "\n raise 'broken gemspec'\n").join File.open(path, "w") do |f| f.write contents end |