[cvsspam-devel] warning about a instance variable not initialized
when adding a new file
David Holroyd
dave at badgers-in-foil.co.uk
Mon May 22 10:37:27 UTC 2006
On Mon, May 22, 2006 at 12:22:22PM +0200, Thomas Poindessous wrote:
> I use cvsspam 0.2.12 and each time I add a new file, I got this warning :
>
> /usr/local/cvsspam/cvsspam.rb:1804: warning: instance variable @fromVer not initialized
> /usr/local/cvsspam/cvsspam.rb:1805: warning: instance variable @fromVer not initialized
Yes, sorry about that. A fix is already committed to the repository,
and will be included in the next release of CVSspam. The relevant
change is attached, if that helps...
ta,
dave
--
http://david.holroyd.me.uk/
-------------- next part --------------
Index: cvsspam.rb
===================================================================
--- cvsspam.rb (revision 223)
+++ cvsspam.rb (revision 224)
@@ -388,6 +388,7 @@
class FileEntry
def initialize(path)
@path = path
+ @fromVer = @toVer = nil
@lineAdditions = @lineRemovals = 0
@repository = Repository.get(path)
@repository.merge_common_prefix(basedir())
@@ -1800,10 +1801,10 @@
return unless $fileEntries.length == 1
file = $fileEntries[0]
name = zap_header_special_chars(file.path)
- unless file.fromVer == "NONE"
+ if file.fromVer
mail.header("References", make_msg_id("#{name}.#{file.fromVer}", $hostname))
end
- unless file.toVer == "NONE"
+ if file.toVer
mail.header("Message-ID", make_msg_id("#{name}.#{file.toVer}", $hostname))
end
end
More information about the cvsspam-devel
mailing list