bigfile/filter: only update MD5 if non-nil
commit2300d4afc5521f3faff20ecbaf078d4777f14916
authorEric Wong <e@80x24.org>
Mon, 14 Sep 2015 09:37:20 +0000 (14 09:37 +0000)
committerEric Wong <e@80x24.org>
Mon, 14 Sep 2015 10:15:04 +0000 (14 10:15 +0000)
tree93b2f3551f1928a343b57b96f9bfe7ad6b0af9ec
parenta753376878eebf42047550ccf5fa881129d8048d
bigfile/filter: only update MD5 if non-nil

It is possible to disable MD5 verification, so we cannot risk
updating a nil object.

Also, favor explicitly calling "update" instead of using "<<" which
YARV will attempt to optimize for Array/String receivers at the cost
of other objects (such as Digest::MD5)
lib/mogilefs/bigfile/filter.rb