From 875ef6e74878dfd60e334901bb478f2cf7667d90 Mon Sep 17 00:00:00 2001 From: utilum Date: Thu, 28 Jun 2018 19:34:28 +0200 Subject: Tweak Previewer::PopplerPDFPreviewer#pdftoppm_exists? Does not warn `instance variable @pdftoppm_exists not initialized`. --- activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/lib') diff --git a/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb b/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb index 2a787362cf..69eb617d7b 100644 --- a/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb +++ b/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb @@ -12,7 +12,7 @@ module ActiveStorage end def pdftoppm_exists? - return @pdftoppm_exists unless @pdftoppm_exists.nil? + return @pdftoppm_exists if defined?(@pdftoppm_exists) @pdftoppm_exists = system(pdftoppm_path, "-v", out: File::NULL, err: File::NULL) end -- cgit v1.2.3