lib/picky/index/file/text.rb in picky-1.3.0 vs lib/picky/index/file/text.rb in picky-1.3.1
- old
+ new
@@ -27,17 +27,18 @@
# Retrieves prepared index data in the form
# * id,data\n
# * id,data\n
# * id,data\n
#
- # Yields an id and a symbol token.
+ # Yields an id string and a symbol token.
#
def retrieve
- id, token =
+ id = nil
+ token = nil
::File.open(cache_path, 'r:binary') do |file|
file.each_line do |line|
id, token = line.split ?,, 2
- yield id.to_i, (token.chomp! || token).to_sym
+ yield id, (token.chomp! || token).to_sym
end
end
end
#
\ No newline at end of file