]> git.pld-linux.org Git - packages/cvsspam.git/blame - ruby19-shadow-outer-var.patch
drop ruby_mod_ver_requires_eq
[packages/cvsspam.git] / ruby19-shadow-outer-var.patch
CommitLineData
9cfe0217
ER
1fix warnings for "warning: shadowing outer local variable - line"
2side effect is that code starts to work again.
3
83963645
ER
4--- cvsspam-0.2.12/collect_diffs.rb~ 2010-06-18 12:38:53.000000000 +0300
5+++ cvsspam-0.2.12/collect_diffs.rb 2010-06-18 12:43:54.208238603 +0300
9cfe0217
ER
6@@ -169,8 +169,7 @@
7
8 raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil
9
10- line = $stdin.gets
11- unless line =~ /^Update of (.+)/
12+ unless $stdin.gets =~ /^Update of (.+)/
13 fail "Log preamble looks suspect (doesn't start 'Update of ...')"
14 end
15
16@@ -189,11 +188,15 @@
17 end
18
19 # look for the start of the user's comment
20+ got_log_message = false
21 $stdin.each do |line|
22- break if line =~ /^Log Message/
23+ if line =~ /^Log Message/
24+ got_log_message = true
25+ break
26+ end
27 end
28
29- unless line =~ /^Log Message/
30+ unless got_log_message
31 fail "Input did not contain a 'Log Message:' entry"
32 end
33
83963645
ER
34@@ -282,12 +282,14 @@
35 blah("about to run #{diff_cmd.join(' ')}")
36 safer_popen(*diff_cmd) do |pipe|
37 # skip over cvs-diff's preamble
38- pipe.each do |line|
39- break if line =~ /^diff /
40+ line = nil
41+ pipe.each do |l|
42+ line = l
43+ break if l =~ /^diff /
44 end
45 file.puts "#U #{line}"
46- pipe.each do |line|
47- file.puts "#U #{line}"
48+ pipe.each do |l|
49+ file.puts "#U #{l}"
50 end
51 end
9cfe0217 52 end
This page took 0.08618 seconds and 4 git commands to generate.