Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sub (not gsub) in case of multiple matches

  • Loading branch information...
commit 7f4e231db281cea9d44bcee5c2818d0f3bb03824 1 parent 86766c4
@croaky croaky authored thoughtbot-travis committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  install.rb
View
2  install.rb
@@ -3,5 +3,5 @@
puts "inserting #{line} into #{path}"
-content = File.read(path).gsub(/^(end\s*)$/) {|match| " #{line}\n#{match}" }
+content = File.read(path).sub(/^(end\s*)$/) {|match| " #{line}\n#{match}" }
File.open(path, 'wb') { |file| file.write(content) }
Please sign in to comment.
Something went wrong with that request. Please try again.