Permalink
Browse files

project-version-bump: add word boundaries in gsub!

  • Loading branch information...
1 parent b7a4d1d commit 2652f0c02ba8b62852e85a68d2b45ef685711386 @sunaku committed Sep 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/project-version-bump
View
@@ -18,7 +18,7 @@ if current = history.find {|(v,_)| v != desired_version }
def replace source, target
if target != source
system "fgrep -lR #{source.inspect} bin lib | "\
- "xargs -r sed -i 's/#{source}/#{target}/g'"
+ "xargs -r sed -i 's/\\<#{source}\\>/#{target}/g'"
end
end

0 comments on commit 2652f0c

Please sign in to comment.