From 518c0ba33bf84a9d4a97507b367965bb20501ef7 Mon Sep 17 00:00:00 2001 From: ahiru Date: Sun, 29 Oct 2017 19:57:34 +0900 Subject: [PATCH] =?UTF-8?q?URI=20=E3=81=AE=20match=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit マッチ条件に "//" が含まれておらず、"任意の文字列:" にマッチしてしまっていた --- core/lib/retriever/uri.rb | 2 +- core/plugin/photo/photo.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/retriever/uri.rb b/core/lib/retriever/uri.rb index ff0223bf..185d7ee0 100644 --- a/core/lib/retriever/uri.rb +++ b/core/lib/retriever/uri.rb @@ -77,7 +77,7 @@ class Retriever::URI def scheme if has_string? and !has_uri? - match = @uri_string.match(%r<\A(\w+):>) + match = @uri_string.match(%r<\A(\w+)://>) if match match[1] else diff --git a/core/plugin/photo/photo.rb b/core/plugin/photo/photo.rb index 2b118c3a..400c7d7b 100644 --- a/core/plugin/photo/photo.rb +++ b/core/plugin/photo/photo.rb @@ -13,7 +13,7 @@ Plugin.create :photo do # Generic URI filter_uri_filter do |uri| - if uri.is_a?(String) && uri.match(%r<\A\w+:>) + if uri.is_a?(String) && uri.match(%r<\A\w+://>) [Addressable::URI.parse(uri)] else [uri] -- 2.14.1.windows.1