codec 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/codec/prefix.rb +2 -2
- data/lib/codec/version.rb +1 -1
- metadata +1 -1
data/lib/codec/prefix.rb
CHANGED
@@ -91,8 +91,8 @@ module Codec
|
|
91
91
|
length, content = @value_codec.encode_with_length(content_field)
|
92
92
|
head_field = field.get_sub_field(@length_codec.id)
|
93
93
|
raise EncodingException, "Missing header for encoding #{@id}" if head_field.empty?
|
94
|
-
# update length field in header
|
95
|
-
head_field.set_value(length,@path,@separator)
|
94
|
+
# update length field in header if length !=0
|
95
|
+
head_field.set_value(length,@path,@separator) if length !=0
|
96
96
|
# encode header
|
97
97
|
header = @length_codec.encode(head_field)
|
98
98
|
return header + content
|
data/lib/codec/version.rb
CHANGED