Server IP : 192.64.118.117 / Your IP : 3.142.219.125 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/opt/alt/ruby27/share/rubygems/rubygems/ |
Upload File : |
# frozen_string_literal: true ## # The UriParser handles parsing URIs. # class Gem::UriParser ## # Parses the #uri, raising if it's invalid def parse!(uri) raise URI::InvalidURIError unless uri # Always escape URI's to deal with potential spaces and such # It should also be considered that source_uri may already be # a valid URI with escaped characters. e.g. "{DESede}" is encoded # as "%7BDESede%7D". If this is escaped again the percentage # symbols will be escaped. begin URI.parse(uri) rescue URI::InvalidURIError URI.parse(URI::DEFAULT_PARSER.escape(uri)) end end ## # Parses the #uri, returning the original uri if it's invalid def parse(uri) parse!(uri) rescue URI::InvalidURIError uri end end