1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

URI::extract extracts only URIs of specified schemes when schemes are specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akira 2002-11-19 07:45:10 +00:00
parent 86a5ba2b01
commit 710e25422b

View file

@ -403,10 +403,10 @@ module URI
regexp = Regexp.new('(?=' + schemes.collect{|s|
Regexp.quote(s + ':')
}.join('|') + ')' + PATTERN::X_ABS_URI,
Regexp::IGNORECASE, 'N')
Regexp::EXTENDED, 'N')
end
str.scan(ABS_URI_REF) {
str.scan(regexp) {
if block_given?
yield($&)
else