📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 06:31:04
📂
/ (Root)
/
opt
/
cpanel
/
ea-ruby27
/
root
/
usr
/
share
/
ruby
/
ruby-2.7.8
/
rubygems
📍 /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/rubygems
🔄 Refresh
✏️
Editing: uri_parser.rb
Read Only
# 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
💾 Save Changes
❌ Cancel