lib/metaheader.rb in metaheader-1.3 vs lib/metaheader.rb in metaheader-1.3.1

- old
+ new

@@ -102,11 +102,11 @@ @data[key] ||= Tag.new key @data[key].value = value end # Returns how many tags were found in the input. - # @return [Fixnum] + # @return [Integer] def size @data.size end # Whether any tags were found in the input. @@ -202,9 +202,10 @@ (?:\s*(?<value>[^\n]+))? \Z/x.freeze def parse(line) line.chomp! + line.encode! Encoding::UTF_8, invalid: :replace # multiline value must have the same line prefix as the key if @last_tag && line.start_with?(@last_prefix.rstrip) if append line return true