lib/dbf/memo.rb in dbf-1.5.2 vs lib/dbf/memo.rb in dbf-1.5.3
- old
+ new
@@ -45,23 +45,25 @@
case @version
when "83" # dbase iii
build_dbt_83_memo(start_block)
when "8b" # dbase iv
build_dbt_8b_memo(start_block)
+ else
+ nil
end
end
- def build_dbt_83_memo(start_block)
+ def build_dbt_83_memo(start_block) #nodoc
@data.seek offset(start_block)
memo_string = ""
begin
block = @data.read(block_size).gsub(/(\000|\032)/, '')
memo_string << block
end until block.size < block_size
memo_string
end
- def build_dbt_8b_memo(start_block)
+ def build_dbt_8b_memo(start_block) #nodoc
@data.seek offset(start_block)
@data.read(@data.read(BLOCK_HEADER_SIZE).unpack("x4L").first)
end
def offset(start_block) #nodoc
\ No newline at end of file