aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-02 23:44:21 -0500
committerJack Nagel2014-09-02 23:44:21 -0500
commitf994c6db584c48cdfe105123a17b1033ae67ca91 (patch)
tree985679bd743818b292ec774ed6301f52a2e17afd /Library
parent49d249ab792ec86c9a1b51877f0d145ea14bfc9a (diff)
downloadhomebrew-f994c6db584c48cdfe105123a17b1033ae67ca91.tar.bz2
Use "if empty?" instead of "unless any?"
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mecab-ko-dic.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Formula/mecab-ko-dic.rb b/Library/Formula/mecab-ko-dic.rb
index 33a251728..1d8bca4a4 100644
--- a/Library/Formula/mecab-ko-dic.rb
+++ b/Library/Formula/mecab-ko-dic.rb
@@ -15,10 +15,8 @@ class MecabKoDic < Formula
"--with-dicdir=#{prefix}"
system "make install"
- unless File.readlines("#{etc}/mecabrc").grep(/^dicdir.*=/).any?
- open("#{etc}/mecabrc", 'a') do |f|
- f.puts "dicdir = #{opt_prefix}\n"
- end
+ if File.readlines("#{etc}/mecabrc").grep(/^dicdir.*=/).empty?
+ open("#{etc}/mecabrc", "a") { |f| f.puts "dicdir = #{opt_prefix}\n" }
end
end
end