summaryrefslogtreecommitdiffstats
path: root/lib/redmine/diff_table.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/diff_table.rb')
-rw-r--r--lib/redmine/diff_table.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/diff_table.rb b/lib/redmine/diff_table.rb
index 2976d2228..ca8c4b9d2 100644
--- a/lib/redmine/diff_table.rb
+++ b/lib/redmine/diff_table.rb
@@ -118,7 +118,7 @@ module Redmine
end
def parse_line(line, type="inline")
- if line[0, 1] == "+"
+ if line.start_with?('+')
diff = diff_for_added_line
diff.line_right = line[1..-1]
diff.nb_line_right = @line_num_r
@@ -126,7 +126,7 @@ module Redmine
@line_num_r += 1
@added += 1
true
- elsif line[0, 1] == "-"
+ elsif line.start_with?('-')
diff = Diff.new
diff.line_left = line[1..-1]
diff.nb_line_left = @line_num_l
@@ -137,7 +137,7 @@ module Redmine
true
else
write_offsets
- if /\s/.match?(line[0, 1])
+ if line.start_with?(/\s/)
diff = Diff.new
diff.line_right = line[1..-1]
diff.nb_line_right = @line_num_r