We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a255895 commit a4bae88Copy full SHA for a4bae88
lib/octokit/repository.rb
@@ -81,8 +81,14 @@ def url
81
82
private
83
84
+ ABS_URI_REGEXP = if URI.const_defined?(:RFC2396_PARSER) # Ruby 3.4+
85
+ URI::RFC2396_PARSER.regexp.fetch(:ABS_URI)
86
+ else
87
+ URI::RFC2396_Parser.new.regexp.fetch(:ABS_URI)
88
+ end
89
+
90
def validate_owner_and_name!(repo)
- if @owner.include?('/') || @name.include?('/') || !url.match(URI::ABS_URI)
91
+ if @owner.include?('/') || @name.include?('/') || !url.match?(ABS_URI_REGEXP)
92
raise_invalid_repository!(repo)
93
end
94
0 commit comments