lib/bencode/encode/array.rb in bencode-0.5.0 vs lib/bencode/encode/array.rb in bencode-0.5.1
- old
+ new
@@ -8,12 +8,9 @@
#
def bencode
begin
"l#{map{|obj| obj.bencode }.join('')}e"
rescue BEncode::EncodeError
- raise BEncode::EncodeError, "array items must be bencodable"
- # TODO: This is probably a bad idea...
- rescue SystemStackError
- raise BEncode::EncodeError, "cannot encode recursive array"
+ raise BEncode::EncodeError, "array items must be encodable"
end
end
end