summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaito <saitowu@gmail.com>2012-05-30 11:56:48 +0800
committerSaito <saitowu@gmail.com>2012-05-30 11:56:48 +0800
commit34cc38b6f5942523820ce239b1d5877b0a97e25e (patch)
tree1af8a7624ae2b41cf311fa6d2c41a2894d3fe71c
parent202807c21a61696ad50aadf43781ca15b9deaede (diff)
downloadgitlab-ce-34cc38b6f5942523820ce239b1d5877b0a97e25e.tar.gz
diff now no need to force_encoding to utf8
-rw-r--r--app/helpers/commits_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index cf1395f20da..63f38eeda0b 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -58,14 +58,14 @@ module CommitsHelper
next if line.match(/^\-\-\- a/)
next if line.match(/^\+\+\+ b/)
- full_line = html_escape(line.gsub(/\n/, '')).force_encoding("UTF-8")
+ full_line = html_escape(line.gsub(/\n/, ''))
if line.match(/^@@ -/)
type = "match"
line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0
line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0
-
+
next if line_old == 1 && line_new == 1
yield(full_line, type, nil, nil, nil)
next