lib/mini_magick/image/info.rb in mini_magick-4.11.0 vs lib/mini_magick/image/info.rb in mini_magick-4.12.0

- old
+ new

@@ -59,16 +59,16 @@ @info.fetch(value) end rescue ArgumentError, TypeError raise MiniMagick::Invalid, "image data can't be read" end - + def parse_warnings(raw_info) return raw_info unless raw_info.split("\n").size > 1 raw_info.split("\n").each do |line| # must match "%m %w %h %b" - return line if line.match? /^[A-Z]+ \d+ \d+ \d+B$/ + return line if line.match?(/^[A-Z]+ \d+ \d+ \d+(|\.\d+)([KMGTPEZY]{0,1})B$/) end raise TypeError end def colorspace