lib/fit_parser/file/data.rb in fit_parser-1.0.4 vs lib/fit_parser/file/data.rb in fit_parser-1.0.5
- old
+ new
@@ -71,17 +71,17 @@
# in case the field size is a multiple of the field length, we must build an array
if field.type != 'string' && field.field_size > field.length
code << "array :#{field.raw_name}, :type => :#{field.type}, :initial_length => #{field.field_size/field.length}\n"
else
# string are not null terminated when they have exactly the lenght of the field
- code << "#{field.type} :#{field.raw_name.gsub('/', '_')}"
+ code << "#{field.type} :#{field.raw_name.gsub('/', '_').gsub('+', '')}"
if field.type == 'string'
code << ", :read_length => #{field.field_size}, :trim_padding => true"
end
code << "\n"
end
- code << "def #{field.name.gsub('/', '_')}\n"
+ code << "def #{field.name.gsub('/', '_').gsub('+', '')}\n"
if field.scale && field.scale != 1
scale = field.scale
if scale.is_a?(Integer)
code << "scale = #{scale.inspect}.0\n"