End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
URI::Generic#check_scheme
check_scheme(v)
lib/uri/generic.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/uri/generic.rb, line 320
def check_scheme(v)
if v && parser.regexp[:SCHEME] !~ v
raise InvalidComponentError,
"bad component(expected scheme component): #{v}"
end
return true
end
Checks the scheme v component against the URI::Parser Regexp for :SCHEME.
See also
#check_port
#check_user
#check_path
#check_userinfo
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0