Commit d7bf75a
committed
omnibus/cli: only match override value against regex for strings
As of Ruby 3.2, `true =~ /regex/` raises an exception (a NoMethodError
for `=~`) instead of returning `nil` (seen in 3.1 and earlier),
so using `--override key:true` (and false / nil) fails with an
error. Instead of always comparing value against a regular expression,
only do it if the value didn't match a known true/false/nil value.
This appears to stem from <https://bugs.ruby-lang.org/issues/15231>.
Signed-off-by: Noel Cower <[email protected]>1 parent 0633d00 commit d7bf75a
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
| |||
0 commit comments