Commit 799bceb
committed
Use ruby 3.1's uri's register_scheme if available
Ruby 3.1 adopted uri 0.11.0. That version changes how schemes can be registered. There is now a register_scheme method.
ruby/uri#26 as part of https://github.com/ruby/uri/releases/tag/v0.11.0
This commit supports both ways and works with the new method if available. The old way errors out when run on uri>=0.11.0/ruby>=3.1.1 parent 5ed6181 commit 799bceb
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments