File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ impl UrlPattern {
132132 }
133133 }
134134 Some ( input) if input. is_kind_of ( ruby. class_hash ( ) ) => {
135+ if base_url. is_some ( ) {
136+ return Err ( Error :: new (
137+ error_class,
138+ "base_url cannot be provided when input is a Hash" ,
139+ ) ) ;
140+ }
141+
135142 let input = RHash :: try_convert ( input) ?;
136143
137144 urlpattern:: UrlPatternMatchInput :: Init ( urlpattern:: UrlPatternInit {
@@ -198,6 +205,13 @@ impl UrlPattern {
198205 }
199206 }
200207 Some ( input) if input. is_kind_of ( ruby. class_hash ( ) ) => {
208+ if base_url. is_some ( ) {
209+ return Err ( Error :: new (
210+ error_class,
211+ "base_url cannot be provided when input is a Hash" ,
212+ ) ) ;
213+ }
214+
201215 let input = RHash :: try_convert ( input) ?;
202216
203217 urlpattern:: UrlPatternMatchInput :: Init ( urlpattern:: UrlPatternInit {
You can’t perform that action at this time.
0 commit comments