プロジェクト

全般

プロフィール

環境対応 #954 » 0001-URI-match.patch

あひる 家鴨, 2017-10-29 21:00

差分を表示:

core/lib/retriever/uri.rb
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
core/plugin/photo/photo.rb
# 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]
(5-5/5)