summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-04-07 11:16:45 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-07 12:03:15 -0500
commit7cb108d62bad5448a7e7b3b9c12717747ad41ca5 (patch)
treed6366cd33a44b8c12320c8a79071c8f0f438be38
parentada8798a3f3eb380dc4c00f0f7d017d190693df2 (diff)
downloadbundler-7cb108d62bad5448a7e7b3b9c12717747ad41ca5.tar.gz
Fix require spec on Ruby < 2
-rw-r--r--spec/runtime/require_spec.rb4
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