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:
parent
86a5ba2b01
commit
710e25422b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue