Kouhei Sutou 2019-02-27 17:13:56 +0900 (Wed, 27 Feb 2019) Revision: 945101528e6d6a9c7b0a190597f071685b86db5d https://github.com/ranguba/chupa-text-decomposer-pdf/commit/945101528e6d6a9c7b0a190597f071685b86db5d Message: Add support the latest poppler gem Modified files: lib/chupa-text/decomposers/pdf.rb Modified: lib/chupa-text/decomposers/pdf.rb (+3 -6) =================================================================== --- lib/chupa-text/decomposers/pdf.rb 2019-02-27 17:13:46 +0900 (5d7323e) +++ lib/chupa-text/decomposers/pdf.rb 2019-02-27 17:13:56 +0900 (382fbe5) @@ -77,13 +77,10 @@ module ChupaText wrap_stderr do Poppler::Document.new(file: path, password: _password) end + rescue Poppler::Error::Encrypted + raise ChupaText::EncryptedError.new(data) rescue GLib::Error => error - case error.code - when Poppler::Error::ENCRYPTED.to_i - raise ChupaText::EncryptedError.new(data) - else - raise ChupaText::InvalidDataError.new(data, error.message) - end + raise ChupaText::InvalidDataError.new(data, error.message) end end -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190227/9f782118/attachment-0001.html>