From 886baa5e3543a983b82a9efd15b9e41f7f38227d Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 26 Sep 2024 09:40:59 +0200 Subject: [PATCH] Fix typo causing incorrect error being raised in blurhash processing failure (#32104) --- lib/paperclip/blurhash_transcoder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/paperclip/blurhash_transcoder.rb b/lib/paperclip/blurhash_transcoder.rb index 150275bc9e0..b4ff4a12a0e 100644 --- a/lib/paperclip/blurhash_transcoder.rb +++ b/lib/paperclip/blurhash_transcoder.rb @@ -7,7 +7,7 @@ module Paperclip width, height, data = blurhash_params # Guard against segfaults if data has unexpected size - raise RangeError("Invalid image data size (expected #{width * height * 3}, got #{data.size})") if data.size != width * height * 3 # TODO: should probably be another exception type + raise RangeError, "Invalid image data size (expected #{width * height * 3}, got #{data.size})" if data.size != width * height * 3 # TODO: should probably be another exception type attachment.instance.blurhash = Blurhash.encode(width, height, data, **(options[:blurhash] || {}))