lib/carrierwave/processing/rmagick.rb in carrierwave-0.5.8 vs lib/carrierwave/processing/rmagick.rb in carrierwave-0.6.0
- old
+ new
@@ -248,12 +248,12 @@
image = ::Magick::Image.read(current_path)
frames = if image.size > 1
list = ::Magick::ImageList.new
image.each do |frame|
- list << yield( frame )
+ list << (block_given? ? yield( frame ) : frame)
end
- list
+ block_given? ? list : list.append(true)
else
frame = image.first
frame = yield( frame ) if block_given?
frame
end