Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2011-10-28 13:02:36 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2013-02-03 12:59:25 (GMT)
commitd5d92f281a4613620de5dcffeb215833fdf2a026 (patch)
treef28167f35bf4bbb83b65607aa880492f3ec9fa72
parentfdde54b0688a73d43950345fb429baa0e73bcef9 (diff)
Fix ruby constants errors
-rw-r--r--lib/patchwork.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/patchwork.rb b/lib/patchwork.rb
index 835d747..7ff17be 100644
--- a/lib/patchwork.rb
+++ b/lib/patchwork.rb
@@ -86,8 +86,8 @@ module Patchwork
end
end
- _HUNK_PATTERN = /^\@\@ -\d+(?:,(\d+))? \+\d+(?:,(\d+))? \@\@/
- _FILENAME_PATTERN = /^(---|\+\+\+) (\S+)/
+ HUNK_PATTERN = /^\@\@ -\d+(?:,(\d+))? \+\d+(?:,(\d+))? \@\@/
+ FILENAME_PATTERN = /^(---|\+\+\+) (\S+)/
def hash_patch(patch)
# logic taken from Patchwork
patch = patch.gsub(/\r/, '').strip! + "\n"
@@ -97,7 +97,7 @@ module Patchwork
patch.split("\n").each do |line|
next if line.empty?
- if filename_match = _FILENAME_PATTERN.match(line)
+ if filename_match = FILENAME_PATTERN.match(line)
# normalise -p1 top-directories
filename = if filename_match[1] == '---'
'a/'
@@ -108,7 +108,7 @@ module Patchwork
line = filename_match[1] + ' ' + filename
hunk_header += line + "\n"
- elsif hunk_match = _HUNK_PATTERN.match(line)
+ elsif hunk_match = HUNK_PATTERN.match(line)
if !found_first_hunk
hash = Digest::SHA1.new.update(hunk_header)
found_first_hunk = true