Kouhei Sutou
null+****@clear*****
Mon Jun 18 18:12:24 JST 2018
Kouhei Sutou 2018-06-18 18:12:24 +0900 (Mon, 18 Jun 2018) New Revision: 7c0e50a7174a320fb0cc20c91a5398140b289610 https://github.com/ranguba/chupa-text/commit/7c0e50a7174a320fb0cc20c91a5398140b289610 Message: Support Ruby 2.6 Modified files: lib/chupa-text/formatters/hash.rb Modified: lib/chupa-text/formatters/hash.rb (+5 -2) =================================================================== --- lib/chupa-text/formatters/hash.rb 2018-06-18 18:12:15 +0900 (4ec27b8) +++ lib/chupa-text/formatters/hash.rb 2018-06-18 18:12:24 +0900 (482e899) @@ -52,8 +52,11 @@ module ChupaText def format_headers(data, target) format_header("mime-type", data.mime_type, target) format_header("uri", data.uri, target) - if data.uri.class == URI::Generic - format_header("path", data.path, target) + case data.uri + when URI::HTTP, URI::FTP, nil + # No path + else + format_header("path", data.path, target) end format_header("size", data.size, target) data.attributes.each do |name, value| -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180618/be429f31/attachment.htm