rescue junk

This commit is contained in:
Ward Wouts 2005-06-06 12:51:08 +00:00
parent ac22535e8d
commit 7f70d6eac0

View file

@ -1,4 +1,4 @@
# $Dwarf: uuencode.rb,v 1.6 2003/07/20 20:32:01 ward Exp $ # $Dwarf: uuencode.rb,v 1.7 2004/06/16 08:14:50 ward Exp $
# $Source$ # $Source$
# #
@ -148,7 +148,11 @@ def _uudecode_array(data)
return mode, filename, decode if line =~ /^end/ return mode, filename, decode if line =~ /^end/
next if line =~ /[a-z]/ next if line =~ /[a-z]/
next if line == nil next if line == nil
next unless ((((line[0] - 32) & 077) + 2) / 3).to_i == (line.length/4).to_i begin
next unless ((((line[0] - 32) & 077) + 2) / 3).to_i == (line.length/4).to_i
rescue NoMethodError
return false
end
unless line.unpack("u").eql?([""]) unless line.unpack("u").eql?([""])
decode.concat(line.unpack("u")) decode.concat(line.unpack("u"))
end end