about summary refs log tree commit diff
path: root/app/lib/language_detector.rb
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2019-12-03 02:25:43 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-12-02 18:25:43 +0100
commit6be16d02cb3f03d21226f9b6664d33e3e8650043 (patch)
tree078570307ddd9fa3386484f1e25bb043babbf805 /app/lib/language_detector.rb
parent27d5d02925252314e4ec81bca8f72c5f91a55b7f (diff)
Update ESLint and RuboCop in Code Climate (#12534)
Diffstat (limited to 'app/lib/language_detector.rb')
-rw-r--r--app/lib/language_detector.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/language_detector.rb b/app/lib/language_detector.rb
index 6f9511a54..302072bcc 100644
--- a/app/lib/language_detector.rb
+++ b/app/lib/language_detector.rb
@@ -44,7 +44,7 @@ class LanguageDetector
     words = text.scan(RELIABLE_CHARACTERS_RE)
 
     if words.present?
-      words.reduce(0) { |acc, elem| acc + elem.size }.to_f / text.size.to_f > 0.3
+      words.reduce(0) { |acc, elem| acc + elem.size }.to_f / text.size > 0.3
     else
       false
     end