lib/tdiary/io/default.rb in tdiary-5.0.4 vs lib/tdiary/io/default.rb in tdiary-5.0.5
- old
+ new
@@ -80,10 +80,10 @@
File::open( file ) do |fh|
fh.flock( File::LOCK_SH )
fh.read.split( /\r?\n\.\r?\n/ ).each do |l|
headers, body = Default.parse_tdiary( l )
next unless body
- body.each do |r|
+ body.lines.each do |r|
count, ref = r.chomp.split( / /, 2 )
next unless ref
diaries[headers['Date']].add_referer( ref.chomp, count.to_i )
end
end